Skip to content

Instantly share code, notes, and snippets.

View iokiwi's full-sized avatar
☁️
Head in the Cloud

Simon Merrick iokiwi

☁️
Head in the Cloud
View GitHub Profile
from itertools import permutations
from functools import reduce
def as_email(first_name, last_name, domain_name, full=False):
if full:
return "{}.{}@{}".format(first_name, last_name, domain_name)
else:
return "{}@{}".format(first_name, domain_name)
def domain_name_permuations(domains, r=2, accumulate=False):

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@iokiwi
iokiwi / StreamyVoteBot.js
Last active September 29, 2016 04:16
Auto voter for phillip defranco on the Streamy video awards page.
/*
How to use:
1. go to https://goo.gl/TpDMLK (bipasses cross origin domain security policy, safe I promise)
2. Click on 'Show of the Year'
3. Complete the first vote manually (there is an authentication step that I can't script)
4. If you haven't already, click "vote again" to return to the list of nominated shows.
5. Open the browser developer tools by right clicking anywhere on the page and then selecting
'inspect element' or using the keyboard shortcut ctrl + shift + i (varies by browser/os)
6. Find the javascript console in the developer tools (again, slightly different on every browser)
7. Copy and paste the entire block of code into the console
import sys, urllib.request
url = "https://data.iana.org/TLD/tlds-alpha-by-domain.txt"
local_filename, headers = urllib.request.urlretrieve(url)
tlds = open(local_filename).readlines()
tlds = [tld.strip() for tld in tlds]
if len(sys.argv) > 1:
domain = sys.argv[1]
else:
@iokiwi
iokiwi / dontclickme.vbs
Created August 3, 2016 03:16
A windows basic script the
'**************************************************
'Name: DONT CLICK ME
'File: DONT CLICK ME.vbs
'Date: 12/11/14
'Breif: A script to mess with windows computers in
' a harmless but fun manner
'**************************************************
VERBOSE = false
IS_RANDOM = false
@iokiwi
iokiwi / Telogis Puzzle
Created August 3, 2016 03:11
This is a puzzle used by Telogis to pre screen job applicants
z=3*0x41662d2d*1237
50872726249;b=(z&1)<
<4;a=b--;o=[];c=a--
b;x=b-a;while(z){x=a&
x?a&b:c+x;{o[z&b^x]=
(x+6*a+b/3/4*c).chr;z
=z/a/a;if(!(z/a&b^x))}
'How to Find Your Lost Windows or Office Product Keys
'http://goo.gl/uwwNmC
'26/01/16 17:53
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
ones = {
0 : "", 1 : "one",
2 : "two", 3 : "three",
4 : "four", 5 : "five",
6 : "six", 7 : "seven",
8 : "eight", 9 : "nine"
}
tens = {
0 : "", 1 : "",