- Xcode or Command Line Tools
- Install Dropbox
- Install 1Password
- Download Chrome
- Set up Filevault
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| !function (window) {"use strict"; | |
| // by WebReflection - WTFPL License | |
| var | |
| prefixes = "r webkitR mozR msR oR".split(" "), | |
| process = "process", | |
| nextTick = "nextTick", | |
| i = 0, | |
| p = window[process] || (window[process] = {}) | |
| ; | |
| while (!p[nextTick] && i < prefixes.length) |
| /* | |
| * parse_link_header() | |
| * | |
| * Parse the Github Link HTTP header used for pageination | |
| * http://developer.github.com/v3/#pagination | |
| */ | |
| function parse_link_header(header) { | |
| if (header.length == 0) { | |
| throw new Error("input must not be of zero length"); | |
| } |
| /* | |
| * sanitize HTML with jQuery based on whitelist | |
| * example: | |
| * sanitizer.sanitize('<a href="foo" class="bar">aaa</a><script>alert("...")</script>', {'a': ['href'], 'strong': []}) | |
| * returns '<a href="foo">aaa</a>' | |
| */ | |
| var sanitizer = {}; | |
| (function($) { | |
| function trimAttributes(node, allowedAttrs) { |
Author: Gregg Lind [email protected]
example coverage report: http://gregglind.github.com/micropilot/coverreport.html
Quick Recipe:
| package main | |
| import ( | |
| "database/sql" | |
| "errors" | |
| "fmt" | |
| _ "github.com/bmizerany/pq" | |
| "os" | |
| "regexp" | |
| "strings" |
| .run(['$cookies', 'user', 'forge', function($cookies, user, forge){ | |
| //Check for cookies. | |
| var token = $cookies["X-Shrug-Token"]; | |
| if( token ) { | |
| forge.sessions.get({id: token}, | |
| function success(data) { | |
| user.login(data); | |
| }, | |
| function error() { |
| { | |
| "builders": [{ | |
| "type": "amazon-ebs", | |
| "access_key": "", | |
| "secret_key": "", | |
| "region": "us-east-1", | |
| "source_ami": "ami-de0d9eb7", | |
| "instance_type": "m1.large", | |
| "ssh_username": "ubuntu", | |
| "ami_name": "packer-jenkins {{.CreateTime}}" |
Web applications need understand what permissions are granted to a current user in two key areas.
403 when trying to access a resource outside of one's graph)Further, in many applications in the wild (for better, or worse, perhaps I need new friends and colleagues) I've seen ways implementd to nerf or flat-out disable authorisation controls. In addition to the regular graph-based authorisation flow, the concept of super users is prevelant, and dangerous.