This file contains hidden or 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
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'english' | |
| require 'rubocop' | |
| ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
| changed_files = `git status --porcelain`.split(/\n/). | |
| select { |file_name_with_status| | |
| file_name_with_status =~ ADDED_OR_MODIFIED |
This file contains hidden or 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
| map $upstream_http_content_length $flag_cache_empty { | |
| default 0; | |
| 0 1; | |
| } | |
| server { | |
| .... | |
| location / { | |
| ... | |
| proxy_no_cache $flag_cache_empty; |
This file contains hidden or 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
| " needs https://code.google.com/p/rog-go/source/browse/exp/cmd/godef/godef.go | |
| if !exists("g:godef_command") | |
| let g:godef_command = "godef" | |
| endif | |
| function! GodefUnderCursor() | |
| let offs=line2byte(line('.'))+col('.')-1 | |
| call Godef("-o=" . offs) | |
| endfunction |
This file contains hidden or 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
| package main | |
| import ( | |
| eventsource "github.com/antage/eventsource/http" | |
| redis "github.com/vmihailenco/redis" | |
| "log" | |
| "net/http" | |
| ) | |
| func haltOnErr(err error){ |
This file contains hidden or 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
| package mustlogin | |
| import ( | |
| "appengine" | |
| "appengine/user" | |
| "fmt" | |
| "net/http" | |
| ) | |
| func init() { |
This file contains hidden or 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
| - certain endpoints are always blocked | |
| if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
| ngx.exit(403) | |
| end | |
| -- import requirements | |
| local cjson = require "cjson" | |
| -- setup some app-level vars | |
| local app_id = "APP_ID" |
This file contains hidden or 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
| module.exports = function(grunt) { | |
| 'use strict'; | |
| var TEMP_HAR_RESOURCE = '.har.tmp'; | |
| var exec = require('child_process').exec, | |
| YSLOW = require('yslow').YSLOW, | |
| doc = require('jsdom').jsdom(), | |
| util = grunt.utils || grunt.util, |
This file contains hidden or 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
| /** | |
| * How to have floating scrollbars in Firefox (Linux, Windows & Mac). | |
| * Screenshot: http://i.imgur.com/bn44L.png | |
| * You need Firefox > 18. Just run this code in a browser-scratchpad: | |
| * | |
| * Ping me on Twitter (@paulrouget) if you run into problems. | |
| * | |
| * 1. Go to about:config - Set devtools.chrome.enabled to true | |
| * 2. Starts Scratchpad (Shift-F4) | |
| * 3. In Scratchpad's menubar, check "Environment > Browser" |
This file contains hidden or 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
| eventsource | |
| go-eventsource | |
| client/client |