View graph.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
//VERTICES: array of vertices | |
//EGDES: array of edges, each edge is a 2 item array (V1, V2) | |
constructor(VERTICES,EDGES){ | |
this.G = new Map(); | |
this.VERTICES = VERTICES; | |
if(VERTICES) | |
VERTICES.forEach((V) => this.addVertex(V)); |
View gist:beaf784e626d70a6adb242aa6bd41f43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
View errou.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +gserrano is my blockchain ID. https://onename.com/gserrano |
View mongodb.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Insert using [].foreEach() | |
var pokemons = [{ | |
"name": "Pikachu", | |
"description": "Rato elétrico bem fofinho", | |
"type": "electric", | |
"attack": 100, | |
"height": 0.4 | |
}, | |
{ |
View recursive_copy_files.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 != '..' )) { |