Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Feix C feix

💭
I may be slow to respond.
  • Beijing
Block or report user

Report or block feix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View read_mysqld_myd.py
#!/usr/bin/env python3
# https://dev.mysql.com/doc/internals/en/layout-record-storage-frame.html
def read_len(content, begin, l):
sum_len = 0
for bit in content[begin:begin+l]:
sum_len = (sum_len << 8) + bit
return sum_len
View read_mysqld_myd.lua
-- https://dev.mysql.com/doc/internals/en/layout-record-storage-frame.html
local read_len = function(content, first, l)
local sum = 0
local last = first + l - 1
for i = first, last do
sum = sum * 256 + content[i]
end
return sum
end
View ancient-earth_gif.sh
#!/bin/bash
echo "download beginning"
years=$(curl -s http://dinosaurpictures.org/ancient-earth | grep option | awk -F'"' '$0 ~ /million|>0</ {print $2}')
base_url=http://dinosaurpictures.org/ancient-earth-assets/images/scotese/
target_path=earth_pics
mkdir -p "$target_path"
IFS=$'\n'
@feix
feix / tcp_timeout.go
Created Jun 12, 2018 — forked from hongster/tcp_timeout.go
Golang example on handling TCP connection and setting timeout.
View tcp_timeout.go
package main
import (
"fmt"
"net"
"time"
"bufio"
)
func handleConnection(conn net.Conn) {
View unwxapkg.py
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
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)
You can’t perform that action at this time.