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
ones = {
0 : "", 1 : "one",
2 : "two", 3 : "three",
4 : "four", 5 : "five",
6 : "six", 7 : "seven",
8 : "eight", 9 : "nine"
}
tens = {
0 : "", 1 : "",
'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
@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))}
@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
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 / 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

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:

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):
import string
k = 13
c = """Uryyb naq jrypbzr gb gur xvjvpba onqtr Chmmyr, lbh qvfpbirerq gur svefg pyhr naq unir fgnegrq gur chmmyr jryy qbar! gb unir lbhe fpber qvfcynlrq ba gur znva yrnqreobneq, abj fraq n grkg zrffntr sebz lbhe cubar gb mreb gjb frira bar mreb mreb frira gjb gjb mreb avar pbanvavat bayl ibhe ertvfgenvba vq ahzore. Qhr gb fvmr pbapreaf envfrq blre fnsrgl naq gUr cHoyvp vzntr bs gur xvjvpba betnavfngvba, gur fgbel ryrzragf bs gur punyyratr jvyy abg or gnxvat cynpr guvf lrne. ABgujvgufgnaqvat, gurer jvyy or cyragl bs sha chmmyrf uvqqra guebhtubhg gur pba naq irahr fb unir sha naq tbbq yhpx! xvaq ertneqf, zvxr. RAQ bs zrffntr qngn"""
#c = """Hello and welcome to the kiwicon badge Puzzle, you discovered the first clue and have started the puzzle well done! to have your score displayed on the main leaderboard, now send a text message from your phone to zero two seven one zero zero seven two two zero nine conaining only vour registraion id number. Due to size concerns raised oyer safety and tH
openstack alarm create \
--name mytestalarm \
--type threshold \
--threshold 5.0 \
--meter-name cpu_util \
--period 60 \
--statistic avg \
--evaluation-periods 1 \
--comparison-operator gt \
--query "metadata.user_metadata.stack=string::7db79235-8cde-43f2-9cf4-6200557164e7" \