Skip to content

Instantly share code, notes, and snippets.

View guesslin's full-sized avatar

Yu-han Lin guesslin

View GitHub Profile
@dm0-
dm0- / kernel-small.md
Last active July 30, 2019 19:53
Build a modified CoreOS kernel (no initramfs modules; X260 driver notes)

Download and start the CoreOS development image in a container. Make sure to bind writable directories over the kernel's build and install paths.

wget 'http://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2'
bzcat coreos_developer_container.bin.bz2 > coreos_developer_container.bin
mkdir boot modules src
sudo systemd-nspawn \
    --bind="$PWD/boot:/boot" \
    --bind="$PWD/modules:/lib/modules" \

--bind="$PWD/src:/usr/src" \

@mcdlee
mcdlee / TextMagic.py
Last active April 8, 2020 19:49 — forked from anonymous/TextMagic.py
Send SMS via TextMagic API and Python
# import modules
from textmagic.rest import TextmagicRestClient
def runAPI():
username = <username>
token = <token>
global client
client = TextmagicRestClient(username, token)
def messagetext(name, examDate, examTime):
#include <vector>
#include <algorithm>
#include <iostream>
#include <functional>
int main()
{
std::vector<char> list = {'a', 'b', ' ', 'd', 'e'};
for (auto c : list)
@mcdlee
mcdlee / gist:8635698
Last active January 4, 2016 14:39
全省各家庭醫師整合性照護計畫院所查詢 -> csv
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 26 15:46:19 2014
@author: mcdlee
"""
from lxml import etree
import urllib2
import unicodedata
@jondkinney
jondkinney / .vimrc
Created January 22, 2014 17:37
Ctags in Vim. Open in a new tab or a vertical split.
" open ctag in tab/vertical split
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <leader><C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
@sudarkoff
sudarkoff / Makefile.pandoc
Last active June 12, 2020 15:13
Makefile for converting Markdown to various formats with Pandoc, TeX and kindlegen
BUILD_DIR := gen
# pandoc is a handy tool for converting between numerous text formats:
# http://johnmacfarlane.net/pandoc/installing.html
PANDOC := pandoc
# pandoc options
# Liberation fonts: http://en.wikipedia.org/wiki/Liberation_fonts
PANDOC_PDF_OPTS := --toc --chapters --base-header-level=1 --number-sections --template=virsto_doc.tex --variable mainfont="Liberation Serif" --variable sansfont="Liberation Sans" --variable monofont="Liberation Mono" --variable fontsize=12pt --variable documentclass=book
PANDOC_EBOOK_OPTS := --toc --epub-stylesheet=epub.css --epub-cover-image=cover.jpg --base-header-level=1
> perl -E 'say "生" & "死"'
生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111
死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011
愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011
@DipSwitch
DipSwitch / gdbinit
Created May 22, 2011 13:40
gdbinit74
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.4 (22/05/2011)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln, dipswitch
#
# FEEDBACK: https://www.reverse-engineering.net