Skip to content

Instantly share code, notes, and snippets.

View skyerday's full-sized avatar

Skyer Tai skyerday

  • Taipei / Taiwan
View GitHub Profile
import sys
def main(argv):
num1 = int(argv[1], 16) & 0xffffffff
br = int(argv[2])
bl = int(argv[3])
num2 = int('0b'+('0'*(31-bl) + '1'*(bl-br+1) + '0'*br), 2)
result = (num1 & num2) >> br
mask = int('1'*(bl-br+1), 2)

Keybase proof

I hereby claim:

  • I am skyerday on github.
  • I am skyer (https://keybase.io/skyer) on keybase.
  • I have a public key whose fingerprint is 617F A474 FBC3 C810 B637 05D2 7D80 C65F 794B 9ECE

To claim this, I am signing this object:

--telegram-cli -s poke.lua
local tg_sources = {'PokemonAlert_大台北', 'Pokémon高雄監視器'}
local tg_index = 1
local start = 0
local inProcess = 0
local users = {}
local geo = {}
@skyerday
skyerday / adb.py
Last active December 11, 2015 21:28
adb wrapper to ease multi-devices control.
#!/usr/bin/python
import subprocess, sys
gDefaultDevice = ""
gDefaultIndex = 0
gDevices = []
def help():
print("Usage: adb.py [DEVICE#] parameters")
print(" adb.py default DEVICE# (Set device as default)")