This file contains 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
// ng-include-view | |
// - directive in module ng | |
// | |
// This works similar to ng-include and it won't create new scope, | |
// instead it uses the same level | |
// | |
// Example usage: | |
// <ng-include-view src=""></ng-include-view> | |
This file contains 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
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
This file contains 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
/* Update: 5/3/14 - supports IE9+, FF3.5+, Opera9.5+ */ | |
@mixin retina($query: null, $density: 2) { | |
$dpi: $density * 96; | |
/* Accepts optional @media query conditions */ | |
@if $query { | |
$query: "and (#{$query})"; | |
} | |
@else { |
This file contains 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 titleize(sentence) { | |
if(!sentence.split) return sentence; | |
var _titleizeWord = function(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); | |
}, | |
result = []; | |
sentence.split(" ").forEach(function(w) { | |
result.push(_titleizeWord(w)); | |
}); | |
return result.join(" "); |
This file contains 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 strict'; | |
angular.module('reusableThings') | |
.directive('fileDropzone', () -> | |
restrict: 'A' | |
scope: { | |
file: '=' | |
fileName: '=' | |
} | |
link: (scope, element, attrs) -> |
This file contains 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
Show hidden characters
{ | |
"folders": | |
[ | |
// add paths per directory you want to show | |
{ | |
// relative paths to the root | |
"path": "/", | |
// optionally give it a different name | |
"name": "My Project", | |
// possible folders to exclude |
This file contains 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
/** | |
* Camelize a string, cutting the string by separator character. | |
* @param string Text to camelize | |
* @param string Word separator (underscore by default) | |
* @return string Camelized text | |
*/ | |
function camelize(text, separator) { | |
// Assume separator is _ if no one has been provided. | |
if(typeof(separator) == "undefined") { |
This file contains 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
First, install nginx for mac with "brew install nginx". | |
Then follow homebrew's instructions to know where the config file is. | |
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
2. Copy it somewhere (use full path in the example below for server.* files) | |
3. sudo nginx -s reload | |
4. Access https://localhost/ | |
Edit /usr/local/etc/nginx/nginx.conf: |
This file contains 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
# ~/.tmux.conf | |
# | |
# See the following files: | |
# | |
# /opt/local/share/doc/tmux/t-williams.conf | |
# /opt/local/share/doc/tmux/screen-keys.conf | |
# /opt/local/share/doc/tmux/vim-keys.conf | |
# | |
# URLs to read: | |
# |
This file contains 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
# Prompt Setup | |
function minutes_since_last_commit { | |
now=`date +%s` | |
last_commit=`git log --pretty=format:'%at' -1` | |
seconds_since_last_commit=$((now-last_commit)) | |
minutes_since_last_commit=$((seconds_since_last_commit/60)) | |
echo $minutes_since_last_commit | |
} |