Skip to content

Instantly share code, notes, and snippets.

.highlight { background-color: #49483e }
.c { color: #75715e } /* Comment */
.err { color: #960050; background-color: #1e0010 } /* Error */
.k { color: #66d9ef } /* Keyword */
.l { color: #ae81ff } /* Literal */
.n { color: #f8f8f2 } /* Name */
.o { color: #f92672 } /* Operator */
.p { color: #f8f8f2 } /* Punctuation */
.cm { color: #75715e } /* Comment.Multiline */
.cp { color: #75715e } /* Comment.Preproc */
@garciadanny
garciadanny / ng-model-filter-2.html
Last active August 29, 2015 14:09
BlogPost: AngularJS Custom Directives
<select ng-model="status" ng-options="profile.status as profile.status for profile in profiles | unique:'status'" >
<option value="">All</option>
</select>
<select ng-model="city" ng-options="profile.city as profile.city for profile in profiles | unique:'city'" >
<option value="">All</option>
</select>
<table>
...
@garciadanny
garciadanny / ng-model-filter-1.html
Created November 10, 2014 03:22
BlogPost: AngularJS Custom Directives
<table>
<tr ng-repeat="studio in studios | filter:status:true" >
<td>{{studio.name}}</td>
<td>{{studio.status}}</td>
</tr>
</table>
@garciadanny
garciadanny / myController.js
Last active August 29, 2015 14:09
BlogPost: AngularJS Custom Directives
var myApp = angular.module('myApp', ['ui.utils']);
myApp.controller('myController', ['$scope', function($scope) {
$scope.profiles = [
{
name: 'Profile 1',
city: 'Denver',
status: 'Active'
},
{
@garciadanny
garciadanny / select-ng-model.html
Last active August 29, 2015 14:09
BlogPost: AngularJS Custom Directives
<select ng-model="status" ng-options="profile.status as profile.status for profile in profiles | unique:'status'" >
<option value="">All</option>
</select>
@garciadanny
garciadanny / select-filter.html
Created November 10, 2014 03:29
BlogPost: AngularJS Custom Directives
<select-filter model="profile" attribute="status"></select-filter>
<select-filter model="profile" attribute="city"></select-filter>
@garciadanny
garciadanny / select-ng-model-2.html
Created November 10, 2014 03:33
BlogPost: AngularJS Custom Directives
<select ng-model="status" ng-options="profile.status as profile.status for profile in profiles | unique:'status'" >
<option value="">All</option>
</select>
<select ng-model="city" ng-options="profile.city as profile.city for profile in profiles | unique:'city'" >
<option value="">All</option>
</select>
@garciadanny
garciadanny / select-filter-directive.js
Created November 10, 2014 03:35
BlogPost: AngularJS Custom Directives
...
myApp.directive('selectFilter', ['$compile', function($compile) {
return {
restrict: 'E',
link: function(scope, element, attrs) {
var model = attrs.model;
var modelList = pluralize(model);
var attribute = attrs.attribute;
var jadeString = "select(ng-model='#{attribute}', ng-options=\"#{model}.#{attribute} as #{model}.#{attribute} for #{model} in #{modelList} | unique:'#{attribute}'\")" + "\n\toption(value='') All";
-------- vim-commands ----------------------------------------------------------
// BASIC CONTROL
hjkl - move
i - insert mode
R - replace mode
o - insert new line below
O - insert new line above
// LINE MOTIONS
0 - start of line

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname