Skip to content

Instantly share code, notes, and snippets.

@solomonhuang
solomonhuang / 16col.txt
Created September 4, 2012 13:09
hexdump convert binary to c array data
$ dd if=/dev/urandom bs=1 count=160 | hexdump -v -e '15/1 "0x%02X, " 1/1 " 0x%02X,\n"'
160+0 records in
160+0 records out
160 bytes (160 B) copied, 0.000507955 s, 315 kB/s
0xB3, 0x4C, 0xD7, 0x9B, 0xC4, 0x83, 0x7C, 0x92, 0xDE, 0xF5, 0x63, 0xBA, 0xAB, 0xCF, 0xDE, 0x13,
0x7F, 0xCE, 0x9D, 0xE9, 0x9F, 0xF8, 0xA2, 0xCB, 0x52, 0x6A, 0xD7, 0xDE, 0xD8, 0x12, 0xAC, 0x71,
0x1B, 0x5E, 0xF2, 0x2E, 0x1C, 0x82, 0x24, 0x24, 0xA2, 0x5D, 0x27, 0x90, 0xE4, 0xDC, 0x21, 0xF3,
0xAB, 0x9F, 0xD6, 0x1A, 0xDE, 0xFC, 0xA3, 0xDC, 0x49, 0xA2, 0xEF, 0xF2, 0x95, 0xCB, 0x8A, 0xE2,
0x6F, 0xD5, 0x2E, 0x48, 0x2B, 0x4D, 0x35, 0xEC, 0x62, 0x24, 0x75, 0xEB, 0xCF, 0x26, 0x57, 0xB2,
0x56, 0x65, 0xDF, 0x25, 0xA9, 0xB1, 0xD9, 0x78, 0x7F, 0x76, 0xB2, 0xF4, 0x57, 0xAD, 0xDC, 0xCC,
@solomonhuang
solomonhuang / TurnipPrices.cpp
Created May 6, 2020 07:08 — forked from Treeki/TurnipPrices.cpp
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{

Keybase proof

I hereby claim:

  • I am solomonhuang on github.
  • I am solomonhuang (https://keybase.io/solomonhuang) on keybase.
  • I have a public key ASACzWVowWZP68-yxbhBZUmgTSm5iDPYIDa3Veh4NvCdego

To claim this, I am signing this object:

dir /s /b /o:gn | "C:\Program Files\IDM Computer Solutions\UltraEdit\GNU\ctags.exe" -L - -f ctags.txt
@solomonhuang
solomonhuang / .vimrc
Last active June 28, 2016 06:53
vimrc
syntax enable
set tabstop=4
set expandtab
set number
set cursorline
filetype indent on
set wildmenu
set showmatch
set incsearch
set hlsearch
[alias]
st = status
co = checkout
br = branch
lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
@solomonhuang
solomonhuang / StevenBlack.conf
Last active February 15, 2016 06:44
Convert StevenBlack-hosts to unbound.conf
server:
local-data: "lb.usemaxserver.de A 0.0.0.0"
local-data: "tracking.klickthru.com A 0.0.0.0"
local-data: "gsmtop.net A 0.0.0.0"
local-data: "click.buzzcity.net A 0.0.0.0"
local-data: "ads.admoda.com A 0.0.0.0"
local-data: "stats.pflexads.com A 0.0.0.0"
local-data: "a.glcdn.co A 0.0.0.0"
local-data: "wwww.adleads.com A 0.0.0.0"
local-data: "ad.madvertise.de A 0.0.0.0"
@solomonhuang
solomonhuang / gist:7443477
Created November 13, 2013 03:57
Easy password generator
genpw(){ < /dev/urandom tr -dc "_A-Z-a-z-0-9!@#$%^&()=" | head -c${1:-16};echo;}
@solomonhuang
solomonhuang / Front-end-Developer-Interview-Questions-TC.md
Created November 19, 2015 15:56 — forked from hanksudo/Front-end-Developer-Interview-Questions-TC.md
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {