made with esnextbin
This file contains hidden or 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
hello | |
This file contains hidden or 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
const { equals } = require('expect/build/jasmineUtils'); | |
expect.extend({ | |
toContainObject(received, argument) { | |
const pass = (() => { | |
if (Array.isArray(argument)) { | |
return equals(received, | |
expect.arrayContaining(argument.map(arg => expect.objectContaining(arg))) | |
); | |
} |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am xalakox on github. | |
* I am xalakox (https://keybase.io/xalakox) on keybase. | |
* I have a public key ASCRbSiHwJ6Mr6gHbg7Pji1a6AEn6ZcI4raErwtL7leFlAo | |
To claim this, I am signing this object: |
This file contains hidden or 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
const timePromise = (fn, fnName) => { | |
console.time(fnName) | |
return eval(fn).then((retval)=>{ | |
console.timeEnd(fnName) | |
return retval | |
}) | |
} |
made with esnextbin
This file contains hidden or 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
#!/usr/bin/env node | |
function solution(A, B) { | |
moves = [[2,1],[2,-1],[-2,1],[-2,-1],[-1,+2],[+1,+2],[-1,-2],[+1,-2]] | |
maxmoves = ~~(A*B/4) || 3 | |
finaldestinations = [] | |
trymove = function(startx,starty,priormoves){ | |
priormoves++; | |
possiblemoves = moves.filter(function(move){ | |
return startx + move[0] > -1 && starty + move[1] > -1 | |
}); |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
#!/bin/sh | |
awk -F',' '/EXTINF/ {canal=$NF; gsub(/ /,"_",canal); getline url; print canal;print "shoot.sh " canal " " url}' canales.m3u |
NewerOlder