Skip to content

Instantly share code, notes, and snippets.

View zjiekai's full-sized avatar
🐼
Home Sweet Home

zjiekai

🐼
Home Sweet Home
View GitHub Profile
@zjiekai
zjiekai / index.html
Last active August 29, 2015 14:10
Moving Blocks to Upper-right
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
@zjiekai
zjiekai / memusg
Last active August 29, 2015 14:18 — forked from netj/memusg
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
set -um
# check input
[ $# -gt 0 ] || { sed -n '2,/^#$/ s/^# //p' <"$0"; exit 1; }
t.sh
while true
do
echo "stderr $(date)" 1>&2
echo "stdout $(date)"
done
bash /tmp/t.sh 2>&1 1>/tmp/output | sleep 9999
@zjiekai
zjiekai / dabblet.css
Created December 7, 2015 06:34
Untitled
.b1 {
background-color: #ccc;
height: 200px;
width: 400px;
}
.b4 {
background-color: #a00;
height: 80%;
width: 300px;
@zjiekai
zjiekai / dabblet.css
Created December 7, 2015 10:48
Untitled
.b1 {
background-color: #ccc;
height: 200px;
width: 400px;
}
.b4 {
background-color: #a00;
height: 80%;
width: 300px;
#!/usr/bin/python
#
# This is the relay script mentioned in http://blog.zorinaq.com/?e=81
#
# Listens on the address and port specified by --local-ip and --local-port, and
# relay all connections to the endpoint specified by --remote-hosts and
# --remote-port. Multiple remote hosts can be specified: one will be selected
# randomly for each connection.
#
# Optionally, if --mode 1:<secret> is specified, insert the secret key as the
@zjiekai
zjiekai / punch.py
Created February 16, 2016 03:07 — forked from koenbollen/punch.py
Proof of Concept: UDP Hole Punching
#!/usr/bin/env python
#
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
#
# This is the client.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#
s = 'xyabax'
d = dict()
def calc0(s):
global inf
inf = len(s) + 1
return calc(s)
def calc(s):
@zjiekai
zjiekai / relay.py
Created February 18, 2016 08:47
tcp relay
#!/usr/bin/python
import logging
import socket
from threading import Thread
class PipeThread(Thread):
pipes = []
////////////////////////////////////////////////////////////////////////////////
// Lab 6
////////////////////////////////////////////////////////////////////////////////
// Include the checkoff program:
.include "checkoff.uasm"
// Leave the following as zero to run ALL the test cases, and get your solution
// validated if all pass. If you have trouble with test case N, set it to N
// to run JUST that test case (for easier debugging):