Skip to content

Instantly share code, notes, and snippets.

View r1cebank's full-sized avatar
🎯
Focusing on rust

Siyuan Gao r1cebank

🎯
Focusing on rust
View GitHub Profile
#include <iostream>
#include <boost/smart_ptr.hpp>
typedef struct node{
int value;
boost::shared_ptr<struct node> next;
}NODE;
boost::shared_ptr<NODE> Null = boost::shared_ptr<NODE>();
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@r1cebank
r1cebank / codeAcademy.js
Last active August 29, 2015 14:23
codeAcademy
if(computerChoice >= 0 && computerChoice <= 0.33) {
computerChoice = "rock"
} else if (computerChoice >= 0.34 && computerChoice <= 0.66) {
computerChoice = "paper"
} else {
computerChoice = "scissors"
}
var hidden = mystery(3);
// this line equals
function hidden(input) {
var input *= 5;
return 4 * input;
}
var jumble = mystery3(hidden);
@r1cebank
r1cebank / main.c
Last active August 29, 2015 14:23
//yes/no client response translation tester.
// s[10] stores the client's response actual response before translation;
// it is passed to clientinp().
// clientinp() returns 1 if input is "yes" and 0 if input is "no"
#include <stdio.h>
#include <stdlib.h>
int clientinp(char *);
@r1cebank
r1cebank / clientinp.c
Last active August 29, 2015 14:23
clientinp.c
int clientinp(char* s) {
int i = 0;
int c;
int length = 10;
while((c = getchar()) != '\n') {
printf("i = %d\n", i);
printf("length: %d\n", length);
let colorSpace = CGColorSpaceCreateDeviceRGB()
let componentCount : UInt = 4
let components : [CGFloat] = [
0, 0, 0, 0,
1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0,
0, 0, 0, 0
]
@r1cebank
r1cebank / bash_profile_pud
Created July 29, 2015 06:50
bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
/**
* Checkbox list examples
*/
var inquirer = require("inquirer");
var shell = require('shelljs');
var question = [
{
type: 'confirm',
name: 'startnow',
@r1cebank
r1cebank / doc.md
Created September 22, 2015 21:59 — forked from aj-r/doc.md

REST Service for LoL spectators

This is an unofficial, uncomplete and (pretty sure) wrong documentation of the RESTful service which powers the League of Legends spectator mode.

This documentation is desgined to be community driven and should be extended by everyone. If you find things missing, add them please!

How it works

Riot's spectator mode works by requesting replay data via HTTP form a service. The data is split in chunks which usually contain about 30 seconds of gameplay. Additionally there are key frames which seem to contain more information then a single chunk. They seem to be used to support