Instantly share code, notes, and snippets.

🌊
ride the wave

Harper Reed harperreed

View GitHub Profile
@understeer
understeer / sendsqs.js
Created Nov 23, 2014
AWS Lambda sample: Send received events to SQS as Message
View sendsqs.js
var QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/{AWS_ACCUOUNT_}/matsuoy-lambda';
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({region : 'us-east-1'});
exports.handler = function(event, context) {
var params = {
MessageBody: JSON.stringify(event),
QueueUrl: QUEUE_URL
};
sqs.sendMessage(params, function(err,data){
View gist:5589387
Addressing each question individually,
What I think:
It's a fantastic fit for small applications and large applications in
some very specific use cases. That being said, I know the persistence
layer you use (disk, dynamo db, sql) has some effect on the performance
so you could tune it to the use case.
Being able to execute queries that are built out of clojure data structures
@maxogden
maxogden / readme.md
Last active Jan 15, 2018
automatically scan for and join open internet enabled wifi networks on linux using node.js (tested on raspberry pi raspbian)
View readme.md
View hours.py
def math(hours, wage, tax):
pretax = hours * wage #figures gross income
taxes = pretax * tax #figures how much goes into taxes
leftover = pretax - taxes #figures how much will be leftover
print "You have made $",pretax
print "Put $", taxes, " in the bank for taxes."
print "$", leftover, " is yours!!"
print "Figure out how much to put in the bank for taxes."
print "These figures are based on working in Colorado"
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@harperreed
harperreed / aws_usage.py
Created Sep 12, 2011 — forked from noneal/aws_usage.py
A script to query the Amazon Web Services (S3/EC2/etc) usage reports programmatically.
View aws_usage.py
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'
@mathiasbynens
mathiasbynens / appify
Created Nov 12, 2010 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
View appify
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
View cid.rb
# needs http://jocr.sourceforge.net/
# sudo port install gocr
#
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open("http://cidlookup.com/lookup/#{ARGV[0].gsub("-","")}/"))
image_url = "http://cidlookup.com" + doc.css("#content .gt img").first.attributes["src"]
caller_name = `curl #{image_url} > name.png 2> /dev/null && gocr name.png`
View gist:653878
# needs http://jocr.sourceforge.net/
# sudo port install gocr
#
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open("http://cidlookup.com/lookup/#{ARGV[0].gsub("-","")}/"))
image_url = "http://cidlookup.com" + doc.css("#content .gt img").first.attributes["src"]
caller_name = `curl #{image_url} > name.png 2> /dev/null && gocr name.png`
View notifo_to_google_voice.php
<?php
/*
Easy to use sms notifications from Notifo
Super quick hack by Harper - @harper - harper@nata2.org
First:
--------------
Get Google-Voice-PHP-API: