Skip to content

Instantly share code, notes, and snippets.

View rra3's full-sized avatar

Robert R Arnold rra3

  • Careerbuilder
  • Atlanta,GA
View GitHub Profile
yes > do_not_delete &; disown; cat do_not_delete | figlet
@rra3
rra3 / vimrc
Created April 13, 2015 16:54
ags config
"
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 = {
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)
}
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,
var putData = JSON.stringify({
bobby: "test",
date: new Date()
});
var buffData = new Buffer(putData).toString("base64");
kinesis.request('PutRecord',
{
StreamName: 'IntelJS',
#!/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
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);
load('auth.js');
load('job_views_hourly.js');
var jq = new JobViewsHourly();
printjson(jq.run_query());
desc "kill the server"
task :terminate do
puts "terminating rails server"
sh "kill -INT $(pgrep ruby)"
end
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'