Skip to content

Instantly share code, notes, and snippets.

Avatar
\o/

chris vanitas daiyi

\o/
View GitHub Profile
View immutify.js
const immutify = (obj) => {
const obj = Object.keys(obj).reduce((acc, key) => {
Object.defineProperty(acc, key, { value: obj[key], writable: false, enumerable: true})
return acc
}, {})
const hash = hashObj(obj)
Object.defineProperty(obj, 'hash', { value: hash, writable: false, enumerable: false})
Object.preventExtensions(obj)
return obj
}
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active Jun 16, 2022
What I Wish I'd Known About Equity Before Joining A Unicorn
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@daveliepmann
daveliepmann / localstorage.cljs
Created Sep 23, 2014
HTML5 localStorage utility functions for ClojureScript. I find it makes for cleaner code when I wrap the native JS.
View localstorage.cljs
(ns localstorage)
(defn set-item!
"Set `key' in browser's localStorage to `val`."
[key val]
(.setItem (.-localStorage js/window) key val))
(defn get-item
"Returns value of `key' from browser's localStorage."
[key]
@AdamMagaluk
AdamMagaluk / api.md
Created Sep 1, 2014
EpicMix Mobile API
View api.md
http://www.epicmix.com/vailresorts/sites/epicmix/api/mobile/weather.ashx
http://www.epicmix.com/vailresorts/sites/epicmix/api/mobile/terrain.ashx
http://www.epicmix.com/vailresorts/sites/epicmix/api/mobile/lifts.ashx
http://www.epicmix.com/vailresorts/sites/epicmix/api/mobile/mountaincams.ashx
http://www.epicmix.com/vailresorts/sites/epicmix/api/mobile/roadconditions.ashx

Query Param

@christineyen
christineyen / annotated git branches
Last active Aug 30, 2018
Longer-lived feature branches can usually benefit from notes, so you can figure out more quickly where you were at in the process. TIL about branch descriptions, and made it easier to keep track of my various branches.
View annotated git branches
sample output: branch names have been changed to protect the innocent
cyen:~/working-path (christine.maybe-whipped-cream)$ git branchdate
2 hours ago master
2 hours ago christine.maybe-whipped-cream
3 hours ago christine.magic-shell -- make sure to use the stuff that hardens, not just choc syrup
10 days ago christine.maybe-add-caramel-syrup
4 weeks ago christine.serve-in-cream-puff -- WIP; current implementation looks too small
5 months ago christine.cream-puff-proof-of-concept
@lox
lox / Makefile
Last active Mar 28, 2018
Replaced Grunt/Gulp with a Makefile
View Makefile
SASSC = sass --style compact
COMPSDIR = resources/assets/components
SASSDIR = resources/assets/css
JSDIR = resources/assets/js
DISTDIR = web/dist
CSSDIR = $(DISTDIR)/css
SASSINC = $(SASSDIR) \
$(COMPSDIR)/asimov/src/scss \
$(COMPSDIR)/asimov-contests/src/scss \
$(COMPSDIR)/asimovicons/src/scss
@nossidge
nossidge / Snowball
Last active Dec 15, 2015
C++ Generate valid snowball poems, using input file of example text and Markov chains to help make it grammatically correct.
View Snowball
/*
~~ Snowball Poem ~~
Snowball (also called a Chaterism): A poem in which each line is a single word,
and each successive word is one letter longer. One of the constrained writing
techniques invented by the Oulipo (Workshop of Potential Literature).
~~ Program Description ~~
This program takes input from the file "input-raw.txt". It examines the file for
View Super Form Reset.css
/* ----------------------------------------------------------------------------------------------------
Super Form Reset
A couple of things to watch out for:
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered.
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders.
- You NEED to set the font-size and family on all form elements
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs