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
| #!/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)) |
Mirrors: standalone servers with complete copy of npm registry
Proxies: proxy to the database (couchdb) of npm registry, if only the npm registry server fails but the db works
## HowTo See this gist: https://gist.github.com/3331671
(+) means server is self updating (pulls newest stuff from offical registry when back online again)
| // While you can edit this file, it's best to put your changes in | |
| // "User/Preferences.sublime-settings", which overrides the settings in here. | |
| // | |
| // Settings may also be placed in file type specific options files, for | |
| // example, in Packages/Python/Python.sublime-settings for python files. | |
| { | |
| // Sets the colors used within the text area | |
| "color_scheme": "Packages/Themes/Espresso Soda/Espresso Soda.tmTheme", | |
| // Note that the font_face and font_size are overriden in the platform |