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
/*ELOQUENT JAVASCRIPT*/ | |
// forEach | |
function forEach(array, action) { | |
for (var i = 0; i < array.length; i++) | |
action(array[i]); | |
} | |
// map | |
function map(func, array) { | |
var result = []; |
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! TrimWhiteSpace() | |
%s/\s\+$//e | |
endfunction | |
autocmd BufWritePre * :call TrimWhiteSpace() | |
function TrimEndLines() | |
let save_cursor = getpos(".") | |
:silent! %s#\($\n\s*\)\+\%$## | |
call setpos('.', save_cursor) | |
endfunction |
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
# ~/.virtualenvs/circus/bin/postactivate | |
#! /bin/bash | |
export BASE_URL="http://localhost:8000" | |
export DJANGO_SETTINGS_MODULE="circus.settings" | |
# ~/.virtualenvs/postdeactivate | |
#! /bin/bash | |
unset BASE_URL | |
unset DJANGO_SETTINGS_MODULE |
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
<!--[if lte IE 8]> | |
{% if DEVELOPMENT %} | |
<script type="text/javascript" src="https://getfirebug.com/releases/lite/1.3/firebug-lite.js"></script> | |
{% endif %} | |
<![endif]--> |
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
# where user_roles is an array filled with strings | |
# option's value and text will both be role | |
<select ng-model="selectedUser.role" ng-options="role for role in user_roles"> | |
</select> | |
# where supported_languages is an array filled with objects | |
# option's value will be language.code and option's text will be language.label | |
<select ng-model="selectedUser.language_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
watch: { | |
scripts: { | |
files: [js + '/**/*.js'], | |
tasks: ['concat:js'], | |
}, | |
handlebars: { | |
files: ['templates/**/*.hbs'], | |
tasks: ['handlebars'], | |
}, | |
css: { |
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 xmlns:ng="http://angularjs.org"> | |
<script src="http://code.angularjs.org/angular.js"></script> | |
<body> | |
<div id="angular-free"> | |
I am a completely inert {{double-curly}}. Angular can't touch this! | |
Free to do whatever jQuery craziness strikes your fancy. | |
Or hell, add a backbone app here. | |
</div> | |
<!-- don't add ng-app="angular-app" - that's what kicks off auto-bootstrapping!!! --> |
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
<div ng-repeat="group in groups"> | |
<div data-group={{group.id}} group-droppable>{{group.name}}</div> | |
<div ng-repeat="pak in paks" draggable> | |
<!-- ... pak display --> | |
</div> | |
</div> | |
<script> | |
<!-- angular directive boilerplate --> |
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 | |
grep -ri $1 $2 --exclude-dir={lib,css,stylesheets} --exclude=*{app.min.js,app.js,templates.js} --color |
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
/* | |
Updates An Accordion's Icon. | |
Just include: | |
<span class="accordion-icon">+</span> | |
To your accordion-toggle! | |
*/ | |
"use strict"; | |
$(function() { |
OlderNewer