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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin</string> |
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
pseq = ( arr ) => arr.reduce( | |
( r, n ) => r.then( typeof n === 'function' ? n : () => Promise.resolve( n ) ), | |
Promise.resolve() ); |
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
#set($root = $input.path('$')) | |
#set($res = {"method":"$context.httpMethod", "resource":"$input.params('resource')", "requestId":"$context.requestId" }) | |
#set( $optional = ["Authorization", "X-MyApp-Api-Token"]) | |
#foreach ($x in $optional) | |
#if ($input.params($x).length() > 0) | |
#set( $res[$x.toLowerCase()] = $input.params($x)) | |
#end |
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
crypto = require "crypto" | |
chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
module.exports = ( size = 40 ) -> | |
throw "bad size" if size < 1 | |
key = "" | |
bytes = crypto.randomBytes( size * 3 ) | |
j = 0 | |
while key.length < size |
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
AWS = require "aws-sdk" | |
https = require "https" | |
creds = | |
accessKeyId: "<<ACCESS KEY ID>>" | |
secretAccessKey: "<<SECRET ACCESS KEY>>" | |
opts = | |
method: "GET" | |
pathname: -> '/restapis' |
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
// CGContextABCD(context!, ...) becomes context?.ABCD(...) | |
import Cocoa | |
extension CGContext { | |
func saveGState() { CGContextSaveGState(self) } | |
func restoreGState() { CGContextRestoreGState(self) } | |
func scaleCTM( sx: CGFloat, sy: CGFloat) { CGContextScaleCTM(self, sx, sy) } | |
func translateCTM( tx: CGFloat, ty: CGFloat) { CGContextTranslateCTM(self, tx, ty) } | |
func rotateCTM( angle: CGFloat) { CGContextRotateCTM(self, angle) } |
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
li#grades_menu_item { | |
display: none; | |
visibility: none; | |
} |
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
#remove stopped containers | |
docker ps -a|grep Exited|cut -d' ' -f1|xargs docker rm $1 | |
#remove untagged images | |
docker images|grep none|awk '{print $3}'|xargs docker rmi $1 |
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
nconf = require 'nconf' | |
cson = require 'cson' | |
csonFormat = | |
stringify : cson.stringifySync | |
parse : cson.parseSync | |
nconf.file file : "#{__dirname}/test.cson", format : csonFormat | |
console.log nconf.get "a" |
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
// | |
// KVOTests.swift | |
// SwiftStuff | |
// | |
// Created by Venkat Peri on 8/11/14. | |
// Copyright (c) 2014 vperi. All rights reserved. | |
// | |
import Cocoa | |
import XCTest |