Skip to content

Instantly share code, notes, and snippets.

View saibotsivad's full-sized avatar
💖
JavaScript

Tobias Davis saibotsivad

💖
JavaScript
View GitHub Profile
@saibotsivad
saibotsivad / indentation.md
Last active December 1, 2016 15:13
The right way to indent

The "correct" way to indent

The issue of tabs-vs-spaces is a long and revered Flame War, so I don't think I'll be changing any minds with what I can write on the topic.

However, it's what I use in all the code that I personally write, and any projects I make public use it.

When to tab

@saibotsivad
saibotsivad / .gitconfig
Last active December 5, 2016 15:28
Mac .profile settings for bash
[color]
sh = auto
ui = auto
pager = true
[user]
name = User Name
email = email@domain.com
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
[core]
@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:

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.