Skip to content

Instantly share code, notes, and snippets.

View objmagic's full-sized avatar

R Li objmagic

View GitHub Profile
(* Copyright (C) 2014 marklrh
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
@objmagic
objmagic / crazy.java
Last active August 29, 2015 14:08
MiniJava test case
class Main {
public static void main(String[] a){
System.out.println(1);
}
}
class M extends Main {
Main m;
public Main man(int a)
{
@objmagic
objmagic / over1.java
Created November 6, 2014 06:35
Overloading
class Main {
public static void main(String[] a){
System.out.println(1);
}
}
class A {
public int run() {
int x;
x = 1;
@objmagic
objmagic / install-libsodium.sh
Last active August 29, 2015 14:09
install-libsodium.sh
#!/bin/sh -ex
V=1.0.0
curl -OL https://download.libsodium.org/libsodium/releases/libsodium-${V}.tar.gz
tar -zxvf libsodium-${V}.tar.gz
cd libsodium-${V}
./configure
make
sudo make install
make clean
@objmagic
objmagic / Main.java
Last active August 29, 2015 14:10
cs132-hw3-hard-testcase
/*
The output is the same as the result Java produces.
The output should be:
0
0
0
0
0
10
0
@objmagic
objmagic / hw1-tests.js
Created January 14, 2015 05:52
cs-c137a test case
tests(
F,
{
name: 'plus',
code: '6 * 7',
expected: 42
},
{
name: 'less than',
code: '6 < 7',
@objmagic
objmagic / Makefile
Last active August 29, 2015 14:14
just playing with ppx
build:
ocamlbuild -use-ocamlfind -package compiler-libs.common,ppx_tools.metaquot \
ppx_component.native
infer:
ocamlbuild -use-ocamlfind -package compiler-libs.common,ppx_tools.metaquot \
ppx_component.inferred.mli
test: build
ocamlopt -I lib -ppx ./ppx_component.native ./test_ppx_component.ml -o ./test_ppx_component.native
@objmagic
objmagic / Makefile
Last active August 29, 2015 14:14
ppx_playaround
build: clean
ocamlbuild -use-ocamlfind -package compiler-libs.common,ppx_tools.metaquot \
ppx_vb.native
infer:
ocamlbuild -use-ocamlfind -package compiler-libs.common,ppx_tools.metaquot \
ppx_vb.inferred.mli
test: build
ocamlopt -I lib -ppx ./ppx_vb.native ./test_vb.ml -o ./test_vb.native
@objmagic
objmagic / apis_config_shouya.json
Last active August 29, 2015 14:15
fast_block
{
"api1":[
{"consumer_key": "",
"consumer_secret": "",
"access_token": "",
"access_token_secret": ""},
{"consumer_key": "",
"consumer_secret": "",
"access_token": "",
"access_token_secret": ""}
@objmagic
objmagic / key.md
Last active August 29, 2015 14:15 — forked from 40298/key.md

Twitter Official Consumer Key

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Android Sign-Up

Consumer key: RwYLhxGZpMqsWZENFVw