Skip to content

Instantly share code, notes, and snippets.

⭕️
Working at UofT

mc256 mc256

⭕️
Working at UofT
Block or report user

Report or block mc256

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:68bc435d3253f94da8b8bad92ac991ed
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC4LoQTSfdrv/FvkALotxsrcxgzc0rzoM4JIzSQPiMnggVuA7uXjSUwMz11pEAntGSrsUe/pwkkGzlHyQyROn7tCURIx4SOtFVnf1HcpHFNxjEbcycLXMWCucMdZRqZyNU2EfdUiacuENh3wrALmmb8hHRB/kRfa8rdm09M7uuDJK3NA9eL+3nbxPwZpE1kKdchmVGYnfrLplJJUEbuHblH2qXlhLTV2UsF2lVHxwG/Y/rzDW9FCMB6Wcpuc3DPva5ZDZxaeYI/qFNSvMn8DPrPC3iFVZQLNeDKFakSqPfJMQP+5JvvWwbRFumVcsfz2XfqGGh5H6lLB82qQYG+duzLrbI4zFU6OZLcUetPkpMYjOYFVCTC56GDvUbIHzqgy81mB3XIZS6hcA+iEQgc5Lg0qoO5KlfdvVRrpiNahg9wfq9a+c3OH1nrvHdKa0p/cI/XAKSHSj1NPeBOnZNnJ8dNuP6N3Ygenft9lcLlXYKYonpPk8KLh13UgZWiLr7GT3DzG5OJXpk6KfBd7iAtfGiEndPkdcN4kx5LFLs+pBRgOkq38PoylivJQ5xD9vtUILu8JbAqgzR2y638iHBduSOIN60ACl4o4837fhCPbfG3qMFsiV0eUZK/8fICmM7hnLnEVvTzWOH68dZkfX6eVvTauFwvNyKP92PPAsEEDAH9Mw== jlchen@warren
View gist:6669face01165a88634609f3e43121de
sudo -u nginx /var/lib/nginx/.local/bin/jupyter notebook
@mc256
mc256 / xxx.cpp
Created Nov 9, 2018
Forward file to input stream
View xxx.cpp
std::ifstream in("ABSOLUTE_PATH_TO_YOUR_FILE");
std::cin.rdbuf(in.rdbuf());
View eecs1012lab1_hints.md

EECS1022 Lab1 Hints

Please be proud of what you wrote. Keep your code formatted.

HTML5

<!DOCTYPE html>
<html>
<head>
View sql.java
package test;
import java.sql.*;
public class TestMysql {
public static void main(String[] args) {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection cnt = DriverManager.getConnection("jdbc:mysql://localhost/app_server", "app_server", "WVezBsbqNPCSMMyN");
View gist:f5d0701b445e018b51499bf22c24a4bc
gcc -pipe -std=c++11 -lstdc++ -pthread -lev -lcrypto ./*.hpp ./*.cpp \
./connection/*.hpp ./connection/*.cpp \
./interface/*.hpp ./interface/*.cpp \
./program/*.hpp ./program/*.cpp \
./socks5/*.hpp ./socks5/*.cpp \
./utility/*.hpp ./utility/*.cpp
View gist:98ba1e7cb897dff85a48f1a1bf83e615
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 Jun 28, 2017
eecs1022hints.java
View 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 Nov 16, 2016
java problem3 test cases
View testcase.java
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 Oct 28, 2016
just example
View random.php
<?php
$wgSMTP = ( (rand(1,2) == 1) ?
array(
'host' => "outlook.corporatedomain1111.com",
'IDHost' => "corporatationname.com",
'port' => 25,
'auth' => false,
'username' => "name@corporationname.com",
You can’t perform that action at this time.