Skip to content

Instantly share code, notes, and snippets.

Tristan Siegel TSiege

Block or report user

Report or block TSiege

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View shell
```
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 Nov 11, 2014
Requiring underscore in your labs
View adding underscore.md
  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 Nov 11, 2014
Hoisting examples
View hoisting.js
// 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
View gist:455d7458f2a3cbb8c4f1
# 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 Jul 21, 2019
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.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@TSiege
TSiege / gist:9214464
Created Feb 25, 2014
My bash profile
View gist:9214464
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 Apr 8, 2018
Adding RVM to bash
View gist:8968730
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"
You can’t perform that action at this time.