Skip to content

Instantly share code, notes, and snippets.

View adamjgrant's full-sized avatar

Adam Grant adamjgrant

  • Software Engineer
View GitHub Profile
@adamjgrant
adamjgrant / idea-clause-synonym_tree.json
Last active May 13, 2021 05:03
2x2x2 tree template (2 ideas x 2 beginnings x 2 endings x many synonyms)
{
"// info": "Template for a 2x2x2 tree",
"main": [
{ "branch": "idea-1 clauses" },
{ "branch": "idea-2 clauses" }
],
"// idea-1 info": "",
"idea-1 clauses": [
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 6, 2024 16:24
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lancejpollard
lancejpollard / less2stylus.coffee
Created February 9, 2012 19:33
Convert LESS to Stylus for Twitter Bootstrap
# Quick hack of regular expressions to convert twitter bootstrap from LESS to Stylus
less2stylus = (string) ->
string = string
.replace(/^(\ *)(.+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets
.replace(/^(\ *)([^\ \n]+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets
.replace(/\ *\{\ *\n*/g, "\n") # remove opening brackets again (some random cases I'm too lazy to think through)
.replace(/\ *\}\ *\n*/g, "\n") # remove closing brackets
.replace(/\;\ *?$/gm, "") # remove semicolons
.replace(/@(\w+):(\ *)\ /g, (_, $1, $2) -> # replace @variable: with $variable =
"$#{$1}#{$2} = "