Skip to content

Instantly share code, notes, and snippets.

View jwilkins's full-sized avatar

Jonathan Wilkins jwilkins

  • San Francisco, CA
View GitHub Profile
@jwilkins
jwilkins / httparallel.rb
Last active March 25, 2020 13:15
parallel http/https download with typhoeus
#!/usr/bin/env ruby
# 25s curl -o all.gz.curl http://download.openwall.net/pub/passwords/wordlists/all.gz
# 11s for this script with 4 parallel requests
require 'typhoeus'
def pfetch(url, splits=4)
response = Typhoeus.head(url)
parallelize = false
basename = File.basename(url)
size = nil
@koto
koto / crime.py
Created September 11, 2012 08:32
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="
@CJKinni
CJKinni / twitterArchiver.rb
Created July 6, 2012 22:18
Download tweets into archivable text formats
#!/usr/bin/ruby
=begin
This script turns downloadable tweets from twitter into a markdown
based text file timeline.
To run, change the 'Username' and 'TwitterFilename' below.
I THINK that this is all working. Check the previous gist version
for a more stable script with far fewer features. Let me know in the
module AWS
module S3
class Bucket
def copy_to(target)
each do |obj|
returning Base.put("/#{target}/#{obj.key}", { 'x-amz-copy-source' => "/#{name}/#{obj.key}", 'x-amz-metadata-directive' => 'COPY', 'Content-Length' => 0 }) do
S3Object.acl(obj.key, target, S3Object.acl(obj.key, name))
end
end
end