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
yes > do_not_delete &; disown; cat do_not_delete | figlet |
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
" | |
let g:ags_agexe = '/usr/local/bin/ag' | |
let g:ags_edit_show_line_numbers = 1 | |
" following two lines create a cool 'find all refs' type deal | |
set grepprg=ags | |
nnoremap K :Ags "\b<C-R><C-W>\b"<CR> | |
" default ag search options - gives a nice colored result buffer | |
let g:ags_agargs = { |
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
wut := strings.NewReader(`{"text": "hello world from golang"}`) | |
uri := "https://careerbuilder.slack.com/services/hooks/incoming-webhook?token=r9bXREKb5bb62kzUMgLJBp9D" | |
req, err := http.NewRequest("POST", uri, wut) | |
resp, err := http.DefaultClient.Do(req) | |
if err != nil { | |
panic(err) | |
} |
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
func (ch *ChatHandler) HandleMessage(m *nsq.Message) error { | |
c := hipchat.Client{AuthToken: ""} | |
// http://stackoverflow.com/questions/14230145/what-is-the-best-way-to-convert-byte-array-to-string | |
n := bytes.Index(m.Body, []byte{0}) | |
req := hipchat.MessageRequest{ | |
RoomId: "546229", | |
From: "GoBot", | |
Message: string(m.Body[:n]), | |
Color: hipchat.ColorPurple, | |
MessageFormat: hipchat.FormatText, |
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
var putData = JSON.stringify({ | |
bobby: "test", | |
date: new Date() | |
}); | |
var buffData = new Buffer(putData).toString("base64"); | |
kinesis.request('PutRecord', | |
{ | |
StreamName: 'IntelJS', |
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 python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
var JobViewsHourly = function () { | |
// load('lib/auth.js'); | |
this.run_query= function () { | |
var start = new Date(2014,2,27,4); | |
var end = new Date(2014,2,28,4); | |
// print('start:', start); | |
// print('end:', end); |
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
load('auth.js'); | |
load('job_views_hourly.js'); | |
var jq = new JobViewsHourly(); | |
printjson(jq.run_query()); | |
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
desc "kill the server" | |
task :terminate do | |
puts "terminating rails server" | |
sh "kill -INT $(pgrep ruby)" | |
end |
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
AUTH=$(curl --silent https://www.google.com/accounts/ClientLogin \ | |
--data-urlencode Email=rrarnold3@gmail.com --data-urlencode Passwd=xxxxxxx \ | |
-d accountType=GOOGLE \ | |
-d source=Google-cURL-Example \ | |
-d service=analytics|grep Auth|awk -F= '{print $2}') | |
curl --silent --header "Authorization: GoogleLogin auth=${AUTH}" \ | |
'https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A79492442&dimensions=ga%3Aday%2Cga%3Ahour&metrics=ga%3Apageviews&filters=ga%3ApagePath%3D~%2Fjobs%2FJ%5BA-Za-z0-9%5D&sort=ga%3Aday%2Cga%3Ahour&start-date=2014-03-11&end-date=2014-03-12&max-results=50' |
NewerOlder