- Install angular with: terminal: bower install angular
- Ctrl-space twice
- ng stuff works now
- Preferences: Editor: angularjs add whitespace
- Debug (there is a shortcut so you can do live edit and it updates in chrome)
- You can change your code style for html. Preferences: Code Style: HTML (worth a look through these settings)
- Cmd+Alt+L to reformat your code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GROOT! v 1.0.0 | |
# Install in your dotfiles, .bashrc, .zshrc or similar | |
# No more cd ../../../../.. to get to the root of a git project | |
# Running the command "groot" will look for the closest .git directory and take you there. | |
# Note that it doesn't traverse up the tree, it takes you directly to the directory with a .git in it... | |
# ...so the command `cd -` takes you back to where you were. | |
# Works with *some* submodules (depending on how your submodule was setup - as a file or a dir) | |
# If you are using submodules, you should be able to figure out how to modify this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gbs () { | |
for k in `git branch | perl -pe 's/^..(.*?)( ->.*)?$/\1/'` | |
do | |
echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k | |
done | sort -r | awk '{ print $4, $5, $6, $7}' | head -n 10 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> | |
<key>Green Component</key> | |
<real>0.15575926005840302</real> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gs() { | |
BRANCH=$(git branch | grep "*" | sed 's/^\* //') | |
TODAY=$(date +"%Y%m%d-%H%M%S") | |
git stash save $TODAY-$BRANCH | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw # simple interface to the reddit API, also handles rate limiting of requests | |
import re | |
from collections import deque | |
from time import sleep | |
USERNAME = "Your username here" | |
PASSWORD = "Your password here" | |
USERAGENT = "Your useragent string here. It should include your /u/username as a courtesy to reddit" | |
r = praw.Reddit(USERAGENT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" charset="utf-8"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"></script> | |
<script src="//cdn.jsdelivr.net/jquery.lazyload/1.9.0/jquery.lazyload.min.js"></script> | |
<script type="text/javascript"> | |
angular.module('boomApp', []) | |
.controller('BoomCtrl', function ($scope, $http) { | |
$http.get(".boom") |