Skip to content

Instantly share code, notes, and snippets.

View ganobrega's full-sized avatar
:electron:

Gabriel Nobrega ganobrega

:electron:
  • Brazil, São Paulo
View GitHub Profile
@ganobrega
ganobrega / Fake FTP.js
Last active April 25, 2018 19:21
Ping a Domain with HTTP Request (Prototype Example)
function FTP(options) {
console.clear()
this.options = options
this.connect().then((result) => {
console.log('Connected')
})
}
@ganobrega
ganobrega / stack.cpp
Last active April 25, 2018 19:22 — forked from milon/stack.cpp
Stack Example
//Stack using array
//Author: Milon
//Update: Gabriel
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_ITENS 4
@ganobrega
ganobrega / Install ArchLinux.md
Last active April 25, 2018 19:23
Author: Henrique Apostolo

Instalação Arch Linux com DDE

Esse tutorial tem como objetivo explicar a instalação básica do Arch Linux, com o ambiente de Desktop baseado no Deepin 15.5

Verificação das partições

Iniciamos vereficando as partições existentes no sistema utilizando o comando: fdisk -l

Alteração das Partições

@ganobrega
ganobrega / Ponteiro.cpp
Last active May 23, 2018 02:34
Linguagem C
#include<stdio.h>
#include<stdlib.h>
void exemplo(int *a, int *b, int *c){
*a = 3;
*b = 4;
*c = 5;
}
@ganobrega
ganobrega / calculadora_cientifica.md
Last active October 11, 2018 21:35
Coloque esse arquivo dentro do aplicativo: https://stackedit.io

Calculadora Científica

Comandos

  1. Limpar memória: SHIFT MODE 3 = =
  2. Inserir valores: Depois que entrou em algum modo da calculadora, digite o valor de $x$, em seguida aperta a tecla , (Não é o .) e digite o valor de $y$, após completar o preenchimento, pressione a tecla M+ para guardar na memória da calculadora.

    É como se fosse digitar o ponto (x, y). Só que na calculadora.

Modos

@ganobrega
ganobrega / example.md
Created March 20, 2019 22:55
Regex HTML

Regex HTML

Capture entire element

`

#!/usr/bin/env node
const git = require('simple-git');
const changelog = require('generate-changelog');
const fs = require('fs');
const idx = require('idx');
const argv = require('minimist')(process.argv.slice(1));
git().tags((err, tags) => {
@ganobrega
ganobrega / rename.sh
Created April 30, 2019 17:27
Rename Icons Pack files
#!/bin/sh
# Rename for file name pattern:
# 001-filename.svg
rename 's/\d{1,3}-//gi' *.svg
@ganobrega
ganobrega / readme.md
Last active June 13, 2019 00:00
Clean Code

Clean Code

CSS

  1. Remove properties with prefixers -moz, -webkit, -o, -ms: (-webkit|-moz|-o-|-ms-).*:.*;
  • e.g: -webkit-transition: all 0.14s linear;
  1. Remove properties with prefixers -moz, -webkit, -o, -ms in values: .*:.*(-webkit|-moz|-o-|-ms-).*;
  • e.g: display: -webkit-flex-shrink