Skip to content

Instantly share code, notes, and snippets.

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

Jun junzhengca

🥼
ummm.... weird....
View GitHub Profile
<!--
This is an example shibboleth2.xml generated for you by TestShib. It's reduced and recommended
specifically for testing. You don't need to change anything, but you may want to explore the file
to learn about how your SP works. Uncomment attributes in your attribute-map.xml file to test them.
If you want to test advanced functionality, start from the distribution shibboleth2.xml and add the
MetadataProvider, the right entityID, and a properly configured SSO element. More information:
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPConfiguration
-->
main: li $t1, 10 # Load N
sw $t1, 0($sp) # Call fib(N)
jal fib
lw $s1, 0($sp) # Load result to $s1
addi $sp, $sp, 4
add $a0, $zero, $s1 # Print out the result
li $v0, 1
syscall
li $v0, 10 # Exit
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <unistd.h>
#define MAX_CONNECTION 100
@junzhengca
junzhengca / 000_README.md
Last active July 30, 2018 14:03
Character LUT for UofT CSCB58 Project

Charactor Lookup Table

CSCB58 Final, University of Toronto

Peter Lang, Jun Zheng

This is a 10x10 lookup table for A-Z.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junzhengca
junzhengca / a.v
Created July 3, 2018 14:14
Weird for some reason A works, B does not work
//Sw[7:0] data_in
//KEY[0] synchronous reset when pressed
//KEY[1] go signal
//LEDR displays result
//HEX0 & HEX1 also displays result
module lab5_part2(SW, KEY, CLOCK_50, LEDR, HEX0, HEX1);
input [9:0] SW;
@junzhengca
junzhengca / add_swap.sh
Last active July 1, 2018 12:14
Add swap space on Ubuntu 16.04
#!/bin/bash
# This file will do the following to your system
# 1. Create a $1 sized file called /swapfile
# 2. Make that a swap space for your system
# 3. Makes a backup of /etc/fstab
# 4. Modify the fstab file so swap is presistant
sudo fallocate -l $1 /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
@junzhengca
junzhengca / README.md
Last active June 13, 2018 12:55
ISLP Website Competition Status

New

This is the default status when you first create a competition. This competition will be treated as if it does not exist.

  • Poster Submission - NO
  • Judging - NO
  • Forum Discussion - NO

Accept Submissions

This is the next status, the competition is live, and accepting submissions.

class Node:
def __init__(self, data = None, left = None, right = None):
self._left = left
self._right = right
self._data = data
def get_left(self):
return self._left
def get_right(self):
type Query {
customers(id: ID, name: String, emailAddress: String): [Customer]
}
type Customer { id: ID, name: String, emailAddress: String, password: String }
type Mutation {
addCustomer(name: String!, emailAddress: String!, password: String!): Customer
}