Skip to content

Instantly share code, notes, and snippets.

View Lencerf's full-sized avatar
🐟
touching fish

Lencerf

🐟
touching fish
  • Google
  • Sunnyvale, CA
View GitHub Profile
@Lencerf
Lencerf / setup_header_size.c
Created June 18, 2020 19:51
sizeof setup_header
#include <stdint.h>
#include <stdio.h>
typedef uint8_t __u8;
typedef uint16_t __u16;
typedef uint32_t __u32;
typedef uint64_t __u64;
struct setup_header {
__u8 setup_sects;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import zipfile
print "Processing File " + sys.argv[1]
file=zipfile.ZipFile(sys.argv[1],"r");
@Lencerf
Lencerf / keybase.md
Created July 10, 2016 09:12
Keybase proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@Lencerf
Lencerf / plist-textifier.swift
Last active February 28, 2016 12:48
Plist Textifier
// a small tool that converts biniary plist file into text format
import Foundation
let origin = NSDictionary.init(contentsOfFile: Process.arguments[1])!
origin.writeToFile(Process.arguments[1], atomically: false)
//compile: xcrun -sdk macosx swiftc plist-textifier.swift -o plist-textifier
//usage: plist-textifier config.plist
@Lencerf
Lencerf / book.cpp
Last active December 31, 2015 01:57
#include <iostream>
#include <string>
class Book
{
public:
Book();
std::string author, title, format;
void SetYearOfPublication(int year);
int GetYearOfPublication() const;
@Lencerf
Lencerf / surge.conf
Created December 10, 2015 01:41 — forked from soffchen/surge.conf
surge.conf
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10, 118.0.0.0/11, 118.64.0.0/10, 118.128.0.0/9, 119.0.