Skip to content

Instantly share code, notes, and snippets.

View frankcortes's full-sized avatar

Francisco Cortés frankcortes

View GitHub Profile
@frankcortes
frankcortes / index.js
Last active April 30, 2018 15:41
npx test
#!/usr/bin/env node
console.log({ author: 'Fran', when: new Date() });
@frankcortes
frankcortes / readme.md
Last active April 27, 2017 08:30
Images useful for packaging readme
@frankcortes
frankcortes / animation.gif
Last active April 4, 2017 08:47
Testing webp
animation.gif
@frankcortes
frankcortes / foobar.txt
Created March 16, 2017 17:33
Dumb Repo 2
Dump Repo 2
@frankcortes
frankcortes / example.txt
Last active March 16, 2017 17:32
Dumb Repo 1
Dumb repo 1
@frankcortes
frankcortes / devices-25al27-01.json
Last active January 30, 2017 15:03
Temperatures' gist
["Laia", "Ignasi", "Pedro", "Isra", "Ramon", "Clare"]
@frankcortes
frankcortes / readme.md
Last active December 14, 2016 16:08
Serializer/Reviver to keep undefined values in the serialized JSON

The problem

Sometimes, we need to serialize some object keys which have an undefined value. In the default implementation, this is not possible.

const realA = { a: undefined };
const realB = undefined;
const a = JSON.parse(JSON.stringify(realA); // returns {}
Object.keys(a); // returns []
Object.keys(realA); // returns ['a']
@frankcortes
frankcortes / own_keys.js
Last active July 20, 2016 21:16
No native window Objects
Object.keys(window).filter(function(key, val){ return window[key] && window[key].toString().indexOf('[native code]') === -1 })
@frankcortes
frankcortes / .zshrc
Last active July 20, 2016 21:19
oh my zshrc plugins
plugins=(git jsontools autojump coffee colored-man-pages emoji encode64 iwhois themes)
@frankcortes
frankcortes / emojis.json
Created March 4, 2016 16:37
Emojis data
{
"100": "score, perfect, numbers, century, exam, quiz, test, pass, hundred",
"1234": "numbers, blue-square",
"bowtie": "classy, bow, face, formal, fashion, suit, magic, circus",
"smile": "happy, cheerful, face, joy, funny, haha, laugh, like",
"laughing": "lol, funny, happy, joy, satisfied, haha, face, glad",
"blush": "face, smile, happy, flushed, crush, embarrassed, shy, joy",
"smiley": "funny, face, happy, joy, haha",
"relaxed": "face, blush, massage, happiness",
"smirk": "face, smile, mean, prank, smug, sarcasm",