npm install funcoffee
require('funcoffee').expose global
#!/usr/bin/env node | |
var path = require('path') | |
var fs = require('fs') | |
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); | |
require(lib + '/awslambda.js').start_runtime(); | |
#!/bin/sh | |
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
-- another way of waiting until an app is running | |
on waitUntilRunning(appname, delaytime) | |
repeat until my appIsRunning(appname) | |
tell application "Messages" to close window 1 | |
delay delaytime | |
end repeat |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# Basically the nginx configuration I use at konklone.com. | |
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
# | |
# To provide feedback, please tweet at @konklone or email eric@konklone.com. | |
# Comments on gists don't notify the author. | |
# | |
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
server { |
re: https://twitter.com/apiblueprint/status/374456335846612992
application/json;charset=utf-8
application/json; charset=utf-8
application/json; charset="utf-8"
application/json // since JSON's default unicode charset is UTF-8
;;; stupid-indent-mode.el --- Plain stupid indentation minor mode | |
;; Copyright (C) 2013 Mihai Bazon | |
;; Author: Mihai Bazon <mihai.bazon@gmail.com> | |
;; Keywords: | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or |
grunt.registerMultiTask('publish', 'Publish the latest version of this plugin', function() { | |
var done = this.async(), | |
me = this, | |
npm = require('npm'); | |
npm.load({}, function(err) { | |
npm.registry.adduser(me.data.username, me.data.password, me.data.email, function(err) { | |
if (err) { | |
console.log(err); | |
done(false); | |
} else { |
#!/bin/bash | |
# git bisect job for jenkins, originally by @bashlog | |
GOOD_BUILD=$(curl 'http://jenkins.example.org:8080/job/BUILDNAME/lastStableBuild/api/json' | sed 's:[{},]:\n:g'|grep '"number":'|sed 's/.*://') | |
BAD_BUILD=$(($GOOD_BUILD + 1)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 2)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 3)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 4)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 5)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 6)) |