Skip to content

Instantly share code, notes, and snippets.

@bendyorke
bendyorke / setup.md
Last active March 12, 2021 14:25
Setting up a new mac
@patmood
patmood / clean_branches.md
Last active August 29, 2015 13:57
Delete all merged branches from a repo

Clean up old git branches

This will delete branches that have already been merged. Good for cleaning up local repos. Wont delete your current branch.

git branch --merged | grep -v "\*" | xargs -n 1 git branch -d

Saved here for my own reference but all credit to this guy: http://stevenharman.net/git-clean-delete-already-merged-branches

WARNING: This will only spare your current branch. Remember that you might lose master/staging/etc if you're not currently on that branch.

@ndelage
ndelage / web_perf.md
Last active February 7, 2019 06:50
Web Performance

Web Preformance

Sources of slow

Database

  • n+1 queries (try :includes or join)
  • Complex joins (is there another way to find the data?)
  • Missing indexes
  • Useless indexes
  • Schema (prossibly denormalize)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 06:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Ofanite
Ofanite / bash_profile.sh
Created August 15, 2011 15:30
My bash_profile
# .bash_profile
#
# This is a heavyweight bash profile, which makes your workstation more
# usable.
# Lion uses a derpy CC by default. This will fix that.
export CC=/usr/bin/gcc-4.2
# Pull in the whatever aliases you might have.