Skip to content

Instantly share code, notes, and snippets.

View mc256's full-sized avatar
๐Ÿค—
follow the rabbit

Jun Lin (Michael) Chen mc256

๐Ÿค—
follow the rabbit
View GitHub Profile
GET / HTTP/1.1
Host: masterchan.me
Connection: close
User-Agent: Paw/3.1.4 (Macintosh; OS X/10.13.3) GCDHTTPRequest
@mc256
mc256 / eecs1022hints.java
Last active June 28, 2017 00:27
eecs1022hints.java
class RoomModel { // In your model .java file
private static final int WIDTH = 4;
private static final int HEIGHT = 5;
private int steps; //USE CONSTRUCTOR TO INITIALIZE.
private Position = new Position();
static class Position {
// Not necessary to have nested class
// but it is a good approach
@mc256
mc256 / testcase.java
Last active November 16, 2016 22:32
java problem3 test cases
Point[] S1 = { new Point("p1", 1, 8), new Point("p2", 2, 7), new Point("p3", 3, 6), new Point("p4", 4, 5), new Point("p5", 5, 4), new Point("p6", 6, 3), new Point("p7", 7, 2), new Point("p8", 8, 1) };
Point[] S2 = { new Point("p1", -8, 3), new Point("p2", -7, 1), new Point("p3", -1, 6), new Point("p4", 2, 4), new Point("p5", 4, 8), new Point("p6", 5, 9), new Point("p7", 7, 1), new Point("p8", 9, 7) };
@mc256
mc256 / random.php
Last active October 28, 2016 03:20
just example
<?php
$wgSMTP = ( (rand(1,2) == 1) ?
array(
'host' => "outlook.corporatedomain1111.com",
'IDHost' => "corporatationname.com",
'port' => 25,
'auth' => false,
'username' => "[email protected]",
"details.scrollview.channel" = "่ฎข้˜…ๆธ ้“"; // ??????
"details.scrollview.errorreport" = "้”™่ฏฏๅ้ฆˆ"; // ??????
"p.t1" = "ๆ”พ้€ๆ็คบ"; // ??????
"p.n1" = "%@ ๆ”พ้€ไบ†ใ€Ž %@ ใ€็š„็ฌฌ%@้›†"; /*new episode*/
"push.want" = "ๆƒณ็œ‹"; // ??????
"push.watched" ๏ผ "ๅทฒ็œ‹"; // ??????
@mc256
mc256 / BinarySortedTree.java
Last active July 25, 2016 23:00
For EECS2030
package quiz4;
import java.util.Random;
import java.util.Scanner;
/**
* BinarySortedTree for EECS2030
*
* @author chen256
*
@mc256
mc256 / BinarySearchTree.java
Last active July 21, 2016 04:17
EECS 2030 BinarySearchTree.java //try to remove a node has two childern
package quiz4;
import java.io.PrintStream;
import java.util.Scanner;
import quiz4.BinarySortedTree.Node;
/**
* This class encapsulates a binary search tree.
///////////////////////////////////
// Mux
///////////////////////////////////
//Mux 1-bit
module yMux1(z, a, b, c);
output z;
input a, b, c;
wire notC, upper, lower;
not my_not(notC, c);
and upperAnd(upper, a, notC);
import java.util.Collections;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import java.util.Random;
// Michael Chen
@mc256
mc256 / nginx.conf
Last active December 12, 2015 00:43
nginx cache server
proxy_cache_path /var/www/cache/moegirl levels=1:2 keys_zone=moegirlproxy:20M inactive=1y max_size=20g;
#่Œ็™พๅŽ‹ๅ›พๅๅ‘ไปฃ็†
server {
listen 80;
listen [::]:80;
server_name img.rabbitcdn.com;
limit_conn limit_addr 30;