Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
pingme() {
ping -c1 -w1 $1 &> /dev/null
if [ $? -eq 0 ]; then
echo -e "$1\tOK"
else
echo -e "$1\tFailed"
fi
}
@miaoski
miaoski / g8v.html
Created April 24, 2014 09:00
g8v.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>g8v.tv 首頁</title>
</head>
<body>
<p>g8v.tv 即將為您服務,敬請期待</p>
<p>去逛逛...
<ul>
<li><a href="http://nonuke.today/">停建核四、遍地烽火全記錄</a></li>
@miaoski
miaoski / sh4-nfsroot-boot-log
Created April 27, 2014 12:30
網樂通 nfsroot 開機 log
Filename 'vmlinux.ub'.
Load address: 0x80000000
Loading: T #################################################################
#################################################################
#################################################################
#########
done
Bytes transferred = 2988970 (2d9baa hex)
PDK7105> setenv bootargs console=ttyAS0,115200 nfsroot=192.168.100.1:/srv/nfs/root root=/dev/nfs rw ip=192.168.100.5:192.168.100.1:192.168.100.1:255.255.255.0:sh4:eth0:off mem=256M
PDK7105> bootm 0x80000000
@miaoski
miaoski / .config
Last active August 29, 2015 14:01
st7105 的 kernel.config
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.59
# Sat May 10 11:28:12 2014
#
CONFIG_SUPERH=y
CONFIG_SUPERH32=y
# CONFIG_SUPERH64 is not set
CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
CONFIG_RWSEM_GENERIC_SPINLOCK=y
@miaoski
miaoski / unpack.sh
Created August 18, 2014 06:28
HITCON2014 Tarmful
#!/bin/bash
for n in `seq 145 -1 1`; do
FN=`ls $n`
echo "$n -- $FN"
echo "$FN" | grep -q bz && tar jfxv "$n/$FN" && continue
echo "$FN" | grep -q gz && tar zfxv "$n/$FN" && continue
echo "$FN" | grep -q xz && tar Jfxv "$n/$FN" && continue
echo "$FN" | grep -i -q zip && unzip "$n/$FN" && continue
file "$n/$FN" | grep -q bz && tar jfxv "$n/$FN" && continue
file "$n/$FN" | grep -q gz && tar zfxv "$n/$FN" && continue
@miaoski
miaoski / finger.py
Created August 18, 2014 06:38
HITCON2014 Finger
import hashlib
import re
import pexpect
import sys
FILLER = '11111111111'
def fillme(text):
x = 16 - len(text)
return text + '1'*x
@miaoski
miaoski / Titin.txt
Created August 18, 2014 07:19
HITCON2014 火山矽肺病
Methionylthreonylthreonylglutaminylarginyltyrosylglutamylserylleucylphenylalanylalanylglutaminylleucyllysylglutamylarginyllysylglutamylglycylalanylphenylalanylvalylprolylphenylalanylvalylthreonylleucylglycylaspartylprolylglycylisoleucylglutamylglutaminylserylleucyllysylisoleucylaspartylthreonylleucylisoleucylglutamylalanylglycylalanylaspartylalanylleucylglutamylleucylglycylisoleucylprolylphenylalanylserylaspartylprolylleucylalanylaspartylglycylprolylthreonylisoleucylglutaminylasparaginylalanylthreonylleucylarginylalanylphenylalanylalanylalanylglycylvalylthreonylprolylalanylglutaminylcysteinylphenylalanylglutamylmethionylleucylalanylleucylisoleucylarginylglutaminyllysylhistidylprolylthreonylisoleucylprolylisoleucylglycylleucylleucylmethionyltyrosylalanylasparaginylleucylvalylphenylalanylasparaginyllysylglycylisoleucylaspartylglutamylphenylalanyltyrosylalanylglutaminylcysteinylglutamyllysylvalylglycylvalylaspartylserylvalylleucylvalylalanylaspartylvalylprolylvalylglutaminylglutamylserylalanylprolylphenylalanyla
@miaoski
miaoski / twblg.json
Created September 20, 2014 09:45
moedict json format (proposal)
{
"defs": [
{
"def": {
"cmn": "打算。考慮思量、預先籌劃。",
"en": "consider, thinking, planning",
"nanhant": "拍算,考慮,思量",
"nanlatn": "phah-sng, kho-lu, su-niu..."
},
"ex": [
@miaoski
miaoski / amis.json
Created September 20, 2014 09:56
moedict json format (proposal)
{
"defs": [
{
"def": {
"cmn": "學習",
"en": "to learn"
},
"ex": [
{
"amis": "Minanam kako to tilid no 'Amis.",
{"h":[{"d":[{"f":"mistake * error錯誤,過失"},{"e":["O `raraw~ ako `konini~.I made this mistake.這是我的過失","`moraraway~ / `ma~`raraw~`ay~ to `lalan~to go astray / get lost走錯了路,迷失了路,迷失方向","O `ci~`raraw~`ay~ `kako~.1. I am associated with an error. 2. I am a sinner.1. 我有過失 2. 我是罪人","`Moraraw~ / `ma~`raraw~ ko `caciyaw~ akoI said the wrong thing.我說錯了話","`Pararaw~ `koya~ `tamdaw~ `takowanan~.He made me out to be a sinner (when I was innocent).他把罪加諸於我(他誣賴我)","`Mapararaw~ `nira~ `kako~.1. He made me an innocent party look guilty. 2. He misled me.1. 他誣陷我 2. 他導我入歧途"],"f":"as used in the biblical context it has become the word sin聖經上當罪講"}]}],"t":"raraw"}