Skip to content

Instantly share code, notes, and snippets.

@taeram
taeram / snippets.sh
Last active June 3, 2019 17:20
Handy Bash Code Snippets and functions
############################
#### Google Shell Style Guide
############################
http://google-styleguide.googlecode.com/svn/trunk/shell.xml
## Increment a variable
siteId=0
siteId=$(( siteId+1 ))
echo $siteId # 1
siteId=$(( siteId+1 ))
@taeram
taeram / web-dev-brain-dump.md
Last active July 6, 2016 20:13
Web Development brain dump

These suggestions are geared towards the Linux/MySQL/Apache/PHP portion of the code-o-sphere.

Source Control

There are many flavours of source control, like CVS, Perforce, SVN, git and Mercurial. I've used CVS, SVN and git, and my overall favourite is git.

Free hosting of public git repositories, and a great social coding environment can be found on GitHub. I'd highly recommend contributing to some open source projects on GitHub, or creating your own projects, as it's an excellent place to point potential employers to, as they can actually see code you've written.

If you want to host private git repositories, Bitbucket allows you to host an infinite number of private repos for teams of up to 5 users.

@taeram
taeram / web-dev-chrome-extensions.md
Last active March 24, 2024 16:30
A list of useful Chrome Extensions for web development

Chrome Web Development Extensions

  • ColorZilla - Advanced Eyedropper, Color Picker
  • Postman - Easy testing of custom HTTP / API requests.
  • Especially useful when combined with requestb.in when testing the format of HTTP GET/POST/PUT/DELETE requests
  • Edit This Cookie - Edit This Cookie is a cookie manager. You can add, delete, edit, search, protect and block cookies!
  • HN Special - A new visual style for Hacker News as well as new features
  • MeasureIt! - Draw out a ruler that will help you get the pixel width and height of any elements on a webpage
  • PageSpeed Insights - Anal
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: