Skip to content

Instantly share code, notes, and snippets.

Avatar
🐟
Fish-touching

Makito SumiMakito

🐟
Fish-touching
View GitHub Profile
View xiaomi_service_login.py
#!/usr/bin/env python
import hashlib
import json
from getpass import getpass
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
View wx_t1t_hack.js
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
View unwxapkg.py
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
@SumiMakito
SumiMakito / p1ngj1a0.js
Last active Dec 21, 2017
解决一些评教难题。
View p1ngj1a0.js
(function () {
var i;
var j;
var groupA = [];
var groupB = [];
var groupC = [];
var scoreTable = [];
// input a mess to get a Pure Array
function copyArray(src) {
@SumiMakito
SumiMakito / Better_NSLog.m
Last active Dec 17, 2017
Gracefully output Arrays/Dictionaries that contain Unicode encoded strings. (may not work very well)
View Better_NSLog.m
//
// Better_NSLog.m
//
// Created by Makito on 2017/12/17.
// Copyright © 2017年 Makito. All rights reserved.
//
#import <Foundation/Foundation.h>
#define INDENT @" "
@SumiMakito
SumiMakito / loop.sh
Created Oct 30, 2017
loop.sh [--expected EXIT_CODE] COMMANDS...
View loop.sh
expected=0
command=$@
re='^[0-9]+$'
if [[ $1 == '--expected' ]] ; then
if ! [[ $2 =~ $re ]] ; then
echo "Error: expected exit code '$2' is invalid."
exit 1
else
expected=$2
command=${@:3}
@SumiMakito
SumiMakito / pn.sh
Last active Sep 20, 2017
A bloody simple script for lazy cats.
View pn.sh
#!/bin/bash
#
# Written by Makito <master@keep.moe>
#
# A bloody simple script for lazy cats.
# I'm too lazy to give it a name more than two words.
# Just regard it as the abbreviation of ping, please.
#
# You : Can I ping a URL?
# Ping: NO WAY! Cannot resolve *****: Unknown host!!
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View GPUImageHighlightShadowTintFilter.m
//
// GPUImageHighlightShadowTintFilter.m
//
// Created by github.com/r3mus on 8/14/15.
//
//
#import "GPUImageHighlightShadowTintFilter.h"
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
@SumiMakito
SumiMakito / res_shift.sh
Created Feb 18, 2016
Find and copy other dpi resources located in local Android icons library.
View res_shift.sh
#!/bin/sh
cd ./drawable-xxxhdpi
flist="`ls | xargs echo`"
cd ..
target=`pwd`
cd /Users/makito/android-icons
cd drawable-xxhdpi
cp -rfv ${flist} "${target}/drawable-xxhdpi" | xargs -n 1
cd ../drawable-xhdpi
cp -rfv ${flist} "${target}/drawable-xhdpi" | xargs -n 1