Skip to content

Instantly share code, notes, and snippets.

@jnoh
jnoh / gist:00dd4c8f852e22340120b6ee8e129a80
Created December 3, 2018 16:25
Delete all AWS lambda functions
aws lambda list-functions --output text | awk '{print $3}' | xargs -I % sh -c 'aws lambda delete-function --function-name %; echo %'

Keybase proof

I hereby claim:

  • I am jnoh on github.
  • I am jnoh (https://keybase.io/jnoh) on keybase.
  • I have a public key ASAMhSVfr9OpLK55hhGGDj3_gRtJob4w7KtdKNbjHw6VOAo

To claim this, I am signing this object:

@jnoh
jnoh / bitly.rb
Created March 12, 2014 08:09 — forked from jehiah/bitly.rb
# Bit.ly API implementation - thanks to Richard Johansso http://gist.github.com/112191
require 'httparty'
class Api::Bitly
include HTTParty
base_uri 'api.bit.ly'
format :json
# Usage: Bitly.shorten("http://example.com")
def self.shorten(url)
@jnoh
jnoh / xtea.rb
Created September 3, 2013 22:21 — forked from cabron/xtea.rb
class XTEA
attr_reader :key, :key_o
MASK = 0xFFFFFFFF
DELTA = 0x9E3779B9
def initialize(key=rand(2**128), n=32)
@key_o = key
@n = n
import csv
from xml.etree.ElementTree import ElementTree
import sys
tree = ElementTree()
tree.parse('gamelist.xml')
writer = csv.writer(open('gamelist1.csv', 'w'), quoting=csv.QUOTE_NONNUMERIC)
for pitch in tree.findAll("pitch"):
Post.all(:include => :comments, :conditions => ['comments.approved = ?', true])
# Grab all posts but only include comments that have been approved.