Skip to content

Instantly share code, notes, and snippets.

@LNA
LNA / a_new_branch_workflow.md
Last active September 27, 2021 15:28
New Branch WorkFlow

git fetch origin && git checkout -b name-of-new-feature-branch origin/release

or

git fetch origin && git checkout -b release origin/release

Check out someone elses branch:

git fetch origin && git checkout name-of-branch

#Example pulled from my dotfiles
# git
alias g="git"
alias gs="git status"
alias gl="git l"
alias gcm="git commit -m"
alias ga="git add"
alias gd="git diff"
alias ga.="git add -A"
alias gco="git checkout"
//Using let
//the let keyword scopes to the nearest block, not function
// it prevents variable declarations from being moved to the top of the scope. This is called hoisting.
// loadingMessage and flashMessage are trapped in their braces, and can't be accessed outside of them.
<script src="./load-profiles.js">
<script>
loadProfiles(["Prince", "MJ", "James Brown"]);
</script>
get to next tab: gt or GT
@LNA
LNA / vim.txt
Created September 2, 2015 18:39
shift + curly brackes: moves paragraphs
@LNA
LNA / cta.py
Last active August 29, 2015 14:21
Pandas Workshop
#Launch Python:
#cd anaconda
#open Launcher.app
ridership = pd.read_csv('https://raw.githubusercontent.com/zafia/talks/gh-pages/pandas-class/cta_ridership.csv')
ridership.loc[ridership.stationname.unique()]
ridership.loc[ridership.stationname.str.contains("Mo”)]
ridership.loc[ridership.stationname == "Morse"]
stations = ridership.groupby("stationname") => #<pandas.core.groupby.DataFrameGroupBy object at 0x102a3e310>
@LNA
LNA / customer.html.haml
Created April 23, 2015 20:36
learning haml
%div.title
%li #{customer.name}
%li #{customer.address.address_1}
%li #{customer.date_of_birth}
@LNA
LNA / gist:0be501533c0ecccfca1e
Created April 10, 2015 20:09
pull branches from master into a branch that you are working on
git fetch origin
git checkout master
git merge --ff-only origin/master
git checkout the-branch-im-working-on
git merge --no-ff origin/master