Skip to content

Instantly share code, notes, and snippets.

View thinkhy's full-sized avatar
🐕
On vacation

thinkhy thinkhy

🐕
On vacation
View GitHub Profile
@thinkhy
thinkhy / CMU-440-Project0.md
Created June 27, 2015 15:19
CMU-440-Project0

15-440 Project 0 Project 0: Implementing a multi-client echo server Due Thursday, January 30, 2014 at 11:59pm The goal of this assignment is to get up to speed on the Go programming language and to help remind you about the basics of socket programming that you learned in 15-213. In this assignment you will implement a simple multi-client echo server in Go: every message sent by a client should be echoed to all connected clients. Server Characteristics Your multi-client echo server must have the following characteristics:

@thinkhy
thinkhy / cs162-2015-notes.md
Last active August 29, 2015 14:23
CS162 2015 Notes
@thinkhy
thinkhy / debug-pintos-cs162.md
Last active August 29, 2015 14:22
How to Debug Pintos

How to Debug Pintos

Pull latest docker image from docker.io

  sudo docker pull thinkhy/cs162-pintos

Run container

@thinkhy
thinkhy / cs162-2015-section3-thread.md
Last active August 29, 2015 14:22
cs162-2015-section3-thread.md
@thinkhy
thinkhy / cs162-2015-section2.md
Last active August 29, 2015 14:22
cs162-2015-section2.md
@thinkhy
thinkhy / cs162-firstAssignment.md
Last active August 29, 2015 14:21
CS162-2015-FirstAssignment

CS162 assignment -- first HomeWork HW0

PDF: http://cs162.eecs.berkeley.edu/static/hw/hw0.pdf

3.1 make

You have probably been using gcc to compile your programs, but this grows tedious and complicated as the number of files you need to compile increases. You will need to write a Makefile that compiles main.c, wc.c, and map.c. You will also need to write a target check that runs some sort of test that will verify the output of wc and main. (You may do this any way you wish, but you MUST verify that

@thinkhy
thinkhy / dupfile_by_rxf.sh
Created October 23, 2014 16:16
RenXiaoFeng's homework about identifying duplicate files
#!/bin/bash
path="."
tmp="/tmp/mydir"
mkdir -p $tmp
chksum() {
_filename=$@
_size=$(stat -c %s "$_filename")
_hash=$(dd if=$1 bs=1M count=1 2>/dev/null | md5sum | awk '{print $1;}')
@thinkhy
thinkhy / gethandouts.pl
Last active August 29, 2015 14:00
Download SHARE handouts automatically.
#!/usr/bin/perl -w
##################################################################
#
# Code on github: https://gist.github.com/thinkhy/11027824
#
##################################################################
use LWP::Simple;
use HTML::LinkExtor;
use URI::URL;
use URI::Escape;