Skip to content

Instantly share code, notes, and snippets.

View daiyi's full-sized avatar
🍕
\o/

chris sm daiyi

🍕
\o/
View GitHub Profile
@nossidge
nossidge / Snowball
Last active December 15, 2015 14:09
C++ Generate valid snowball poems, using input file of example text and Markov chains to help make it grammatically correct.
/*
~~ 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
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
}
@lox
lox / Makefile
Last active March 28, 2018 12:55
Replaced Grunt/Gulp with a 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
@AdamMagaluk
AdamMagaluk / api.md
Created September 1, 2014 23:58
EpicMix Mobile API
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 February 3, 2023 21:35
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.
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
@daveliepmann
daveliepmann / localstorage.cljs
Created September 23, 2014 08:23
HTML5 localStorage utility functions for ClojureScript. I find it makes for cleaner code when I wrap the native JS.
(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]
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

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

/* ----------------------------------------------------------------------------------------------------
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