Skip to content

Instantly share code, notes, and snippets.

@garciadanny
garciadanny / curl.md
Created August 16, 2018 15:38 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

.wufoo caption, .wufoo label.desc {
font-size: 16px;
font-weight: bold;
color: #384047;
text-align: center;
margin-bottom: 20px;
}
/* ----- Backgrounds ----- */
#container,
@garciadanny
garciadanny / tmux.md
Last active August 29, 2015 14:25 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
-------- 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
@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";
@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.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.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 / 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'
},
{