Skip to content

Instantly share code, notes, and snippets.

View junzhengca's full-sized avatar
🥼
ummm.... weird....

Jun junzhengca

🥼
ummm.... weird....
View GitHub Profile
@junzhengca
junzhengca / Website.md
Created October 10, 2014 18:59
Website.MD

##Canada canadian symposium on catalysis symposia ##North America North American Catalysis Society Meeting ##International International Congress on Catalysis

@junzhengca
junzhengca / main
Created June 15, 2015 02:45
A simple Python code to do mod operation
def find_mod(a,b):
return (a*7) % b
testNumber = -1
resultNumber = -1
while resultNumber != 1:
testNumber += 1
resultNumber = find_mod(testNumber,880)
print(str(testNumber))
@junzhengca
junzhengca / main.c
Created June 23, 2015 20:44
Simple Linux CPU Percentage Program
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
#define ANSI_COLOR_BLUE "\x1b[34m"
#define ANSI_COLOR_MAGENTA "\x1b[35m"
#define ANSI_COLOR_CYAN "\x1b[36m"
#define ANSI_COLOR_RESET "\x1b[0m"
var x, resolution, susp;
prompt = prompt ? prompt.v : "";
x = Sk.inputfun(prompt);
if (x instanceof Promise) {
susp = new Sk.misceval.Suspension();
susp.resume = function() {
return new Sk.builtin.str(resolution);
@junzhengca
junzhengca / spirte.scratch
Created September 13, 2015 18:52
scratch gravity & jump example
when greenflag clicked
set jumping to 0
set jumpFrame to 1
set jMultiplier to 20
set gMultiplier to 2
delete all of boxCollision
add 50 to boxCollision
add 40 to boxCollision
forever
calcGrav
@junzhengca
junzhengca / main.py
Last active October 14, 2015 16:35
WMCI CompSci 20 - 如何在Python中读取文件,并随机输出单词,使用Python的random库
#Copyright Jun Zheng All Rights Reserved, this gist is licenced under Creative Common Attribute International
#Jun Zheng 版权所有,保留所有权利 此Gist使用Creative Common Attribute International授权
import random
f = string.join(open("word.list").readlines()).split()
print(random.choice(f))
@junzhengca
junzhengca / doc.md
Last active October 18, 2015 19:42
A JavaScript class that displays info blocks on your website

How to use

<div class="index-panel-pic-post-container" id="index-panel-pic-post-container">
  <div id="index-panel-pic-post-container-scrollable">
    <div class="index-panel-pic-post-container-block"></div>
    <div class="index-panel-pic-post-container-block"></div>
    <div class="index-panel-pic-post-container-block"></div>
    <div class="index-panel-pic-post-container-block"></div>
    <div class="index-panel-pic-post-container-block"></div>
    <div class="index-panel-pic-post-container-block"></div>
@junzhengca
junzhengca / README.md
Last active May 22, 2016 16:48
Processing 倒计时器

简单的Processing倒计时器,在Mac OSX 10.11.5 和 Processing 3.0.1环境下测试可用,不过目测什么系统都可以用就是了= =

@junzhengca
junzhengca / template.tex
Last active November 18, 2016 20:09
LaTeX PDF File Template, I use this for University of Toronto assignments and exercises.
\documentclass{article}
\usepackage{fullpage}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{fancyhdr}
@junzhengca
junzhengca / compsci-tut-intro.html
Last active November 28, 2016 14:10
Code for posting new videos.
<img class="alignnone size-full wp-image-28" src="http://whatscodecn.me/wp-content/uploads/2016/11/cover-1.png" alt="cover" width="884" height="499" />
计算机科学教室入门篇,第二课。
input(),变量,Memory Model,Debug
Bilibili:<a href="http://www.bilibili.com/video/av7191464/">http://www.bilibili.com/video/av7191464/</a>
这次的练习:
<ul>