Skip to content

Instantly share code, notes, and snippets.

```
gpg: directory `/Users/flatiron/.gnupg' created
gpg: new configuration file `/Users/flatiron/.gnupg/gpg.conf' created
gpg: WARNING: options in `/Users/flatiron/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/Users/flatiron/.gnupg/secring.gpg' created
gpg: keyring `/Users/flatiron/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: DBG: armor-keys-failed (KEY 0x409B6B1796C275462A1703113804BB82D39DC0E3 BEGIN
) ->0
gpg: DBG: armor-keys-failed (KEY 0x409B6B1796C275462A1703113804BB82D39DC0E3 END
@tsiege
tsiege / adding underscore.md
Created November 11, 2014 18:12
Requiring underscore in your labs
  1. go to underscore
  2. copy the entire contents of the file
  3. create a new file called underscore.min.js
  4. paste the contents of the file you had copied and save it
  5. edit the requires.yml file to add this line to the file and save it - path/to/underscore.min.js
  6. now run ironboard or ironboar -b and enjoy!
@tsiege
tsiege / hoisting.js
Created November 11, 2014 16:06
Hoisting examples
// what's hoisted
// var carName (just the variable name is hoisted)
// driveCar (whole function is hoisted because driveCar is a function declaration)
// var parkCar (just the variable name is hoisted because parkCar is a function expression)
console.log(carName);
// -> undefined
driveCar(carName);
// -> driving undefined
parkCar(carName);
// -> TypeError: undefined is not a function
@tsiege
tsiege / gist:455d7458f2a3cbb8c4f1
Last active March 20, 2020 20:16
Bash Profile
# prompt and env config stuff
#============================
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) == "nothing to commit, working directory clean" ]] && echo ""
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo ""
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ (\1$(parse_git_dirty))/"
}
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 14, 2024 15:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@tsiege
tsiege / gist:9214464
Created February 25, 2014 18:09
My bash profile
export PATH="$HOME/.rbenv/bin:$PATH"
export ZSH=$HOME/.oh-my-zsh
source ~/.git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
# Configuring Our Prompt
@tsiege
tsiege / gist:8968730
Last active April 8, 2018 02:18
Adding RVM to bash
export PS1="wd: \[\e[32m\]\W\[\e[0m\]\[\e[0;31m\]\[$IRED\] (ruby v: \$(rvm_version))\$(parse_git_branch)$\n⛵ \[\e[0m\]"
#prints this #=> wd: sql-book-ruby-004 (ruby v: 2.1.0) (master ✔)$
function rvm_version {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ "$gemset" != "" ] && gemset="@$gemset"
local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
[ "$version" != "" ] && version="$version"
local full="$version$gemset"