Skip to content

Instantly share code, notes, and snippets.

Guilherme Serrano gserrano

Block or report user

Report or block gserrano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:beaf784e626d70a6adb242aa6bd41f43
function _delete(el){
el.parentNode.removeChild(el);
}
function hidePost(){
window.scrollTo(0,document.body.scrollHeight);
btn = document.querySelector("[data-testid='post_chevron_button']");
timer = 1900;
@gserrano
gserrano / errou.sh
Created Nov 29, 2018
echo ascii ERROU art
View errou.sh
echo -n $'\E[31m'
echo ' -hNNNNNNNNNNNNNNNNNNNNNNNNmdo` '
echo ' .hNNNNNNNNNNNNNNNNNNNNNNNNNNNNNms.. '
echo ' `mNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmm- '
echo ' /dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNms` '
echo ' .hNNNNNNmmdmmNmmmmdNdyo+sdmNNNNNNNNNNNNNNh. '
echo ' `hNNNNdo:--...-....::.....--:/sdNNNNNNNNNNmo. '
echo ' `hNNNNs----.````````````````..---yNNNNNNNNNNNy` '
echo ' yNNmm+-----.`````````````````..---/ymNNNNNNNNNh` '
echo ' :NNNN+----..``````````````````....--:hmNNNNNNNNN+ '
View gist:40f100a36ef3fa87df53
Verifying that +gserrano is my blockchain ID. https://onename.com/gserrano
@gserrano
gserrano / mongodb.js
Last active Nov 25, 2015
Mongo DB basics
View mongodb.js
// Insert using [].foreEach()
var pokemons = [{
"name": "Pikachu",
"description": "Rato elétrico bem fofinho",
"type": "electric",
"attack": 100,
"height": 0.4
},
{
@gserrano
gserrano / recursive_copy_files.php
Created Nov 19, 2015
PHP Recursive copy files
View recursive_copy_files.php
/*
* This function copy $source directory and all files
* and sub directories to $destination folder
*/
function recursive_copy($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
You can’t perform that action at this time.