Skip to content

Instantly share code, notes, and snippets.

View x89's full-sized avatar

David John x89

View GitHub Profile
@x89
x89 / time_lookups.rb
Last active March 20, 2017 11:53
Benchmark domain name lookups
require 'benchmark'
require 'rubydns'
domains = [
'google.de',
'google.co.uk',
'google.com',
'google.jp',
'redd.it',
@x89
x89 / 6.rb
Created December 6, 2016 09:11
Ruby
frequency_array = Array.new(8)
frequency_array.fill(Hash.new)
lines.each do |line|
puts line.chars.join(' ')
line.chars.each_with_index do |c,idx|
hash = frequency_array[idx]
if hash.include? c then
hash[c] += 1
else

Keybase proof

I hereby claim:

  • I am x89 on github.
  • I am naypam (https://keybase.io/naypam) on keybase.
  • I have a public key whose fingerprint is EA02 1A29 D8AE 2D11 DE00 4B80 AB40 62F1 7ECF AA3A

To claim this, I am signing this object:

@x89
x89 / upload-img-to-imgur.bash
Created December 9, 2015 16:55 — forked from alvin2ye/upload-img-to-imgur.bash
upload image to imgur.bash
#!/bin/bash
# imgur script by Bart Nagel <bart@tremby.net>
# version 4
# I release this into the public domain. Do with it what you will.
# Required: curl
#
# Optional: xsel or xclip for automatically putting the URLs on the X selection
# for easy pasting