Skip to content

Instantly share code, notes, and snippets.

View iptq's full-sized avatar

michael iptq

View GitHub Profile
// ==UserScript==
// @name OsuTweaks
// @version 0.1.0
// @author IOException
// @run-at document-start
// @include http://osu.ppy.sh*
// @include https://osu.ppy.sh*
// @require https://code.jquery.com/jquery-3.6.0.min.js
// ==UserScript==
// @name make obwc website readable
// @version 1
// @grant none
// @include https://obwc.net/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];

This userscript changes some styles on the osu website
If u have tampermonkey or greasemonkey installed, hit the "raw" button of the script to install automatically
Or create a new script and copy-paste the below in
There's some options in the code, modify stuff to customize but it may break on different zooms/phones, not fully tested

@iptq
iptq / main.rs
Created October 17, 2019 07:01
stlc
use std::convert::TryFrom;
use std::rc::Rc;
use symbol::Symbol;
#[derive(Debug)]
enum Error {
UnboundName(Symbol),
Mismatch(Rc<Type>, Rc<Type>),
NotArrow,

Keybase proof

I hereby claim:

  • I am iptq on github.
  • I am michaelz (https://keybase.io/michaelz) on keybase.
  • I have a public key ASArajdaYzbql7aXaUnBl6G5yasMz7nhOIgkLEnDqEQdhwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am iptq on github.
  • I am michaelz (https://keybase.io/michaelz) on keybase.
  • I have a public key ASCEhMaJMl3DkJKGSXc8q1Nr5FIMVapUMwtEbQkCH7vIQAo

To claim this, I am signing this object:

call plug#begin()
Plug 'vim-syntastic/syntastic'
Plug 'tomasiser/vim-code-dark'
Plug 'vim-airline/vim-airline'
Plug 'scrooloose/nerdtree'
Plug 'rhysd/vim-clang-format'
Plug 'kien/ctrlp.vim'
call plug#end()

Keybase proof

I hereby claim:

  • I am iptq on github.
  • I am failedxyz (https://keybase.io/failedxyz) on keybase.
  • I have a public key ASAOyYr2aYI5dkkI2c1UXnrjbb5t1l9ICUk__yJZpjvtIgo

To claim this, I am signing this object:

@iptq
iptq / solve.py
Created March 26, 2017 21:50
KeyPass Implementation
chars = " FuMlX%3kBJ:.N*epqA0Lh=En/diT1cwyaz$7SH,OoP;rUsWv4g\\Z<tx(8mf>-#I?bDYC+RQ!K5jV69&)G"
def get_key(seed):
result = ""
seed = 16631 * (seed % 0x7fffffff) + 511115
for i in range(16):
result += byte[seed % 0x7fffffff % 82]
seed = 16631 * (seed % 0x7fffffff) + 511115
result += chars[seed % 0x7fffffff % 82]
return result
@iptq
iptq / solve.py
Created March 26, 2017 21:24
PyCrypto Solution
#!/usr/bin/env python
frequencies = {'a': 0.0651738, 'b': 0.0124248, 'c': 0.0217339, 'd': 0.0349835, 'e': 0.1041442, 'f': 0.0197881, 'g': 0.0158610, 'h': 0.0492888, 'i': 0.0558094, 'j': 0.0009033, 'k': 0.0050529, 'l': 0.0331490, 'm': 0.0202124,
'n': 0.0564513, 'o': 0.0596302, 'p': 0.0137645, 'q': 0.0008606, 'r': 0.0497563, 's': 0.0515760, 't': 0.0729357, 'u': 0.0225134, 'v': 0.0082903, 'w': 0.0171272, 'x': 0.0013692, 'y': 0.0145984, 'z': 0.0007836, ' ': 0.1918182}
def single_byte_xor(b, s):
""" Performs XOR of the single byte against every character in string. """
assert len(b) == 1
x = ord(b)