Skip to content

Instantly share code, notes, and snippets.

@psychoss
psychoss / CVJNI.java
Created January 18, 2016 08:38 — forked from sheimi/CVJNI.java
JNI Demo (invode opencv ...)
import java.io.*;
public class CVJNI {
//Load jni library
static {
try {
System.loadLibrary("cvjni");
} catch (Exception e) {
e.printStackTrace();
}
@psychoss
psychoss / README.md
Created January 13, 2016 08:44 — forked from mbostock/.block
The Gist to Clone All Gists

Run like so:

chmod u+x gist-clone-all
./gist-clone-all username OAUTH_TOKEN

You'll want to replace “username” with your own username and “OAUTH_TOKEN” with an OAuth token.

This script clones using the push URL, so you should probably be the owner of the gists. You could also use this to clone someone else's gists, but in that case you may wish to edit the code to use gist_pull_url instead.

@psychoss
psychoss / header.rs
Created January 13, 2016 06:19 — forked from m4rw3r/header.rs
http.rs: Simple HTTP-library for Rust
use std::fmt;
use std::ascii::StrAsciiExt;
#[deriving(Clone,Eq)]
pub enum HeaderName {
Accept,
AcceptCharset,
AcceptEncoding,
AcceptLanguage,
Age,
@psychoss
psychoss / fast.rs
Created January 13, 2016 06:18 — forked from Dr-Emann/fast.rs
bad rust?
let start = time::now();
let metadata = try!(fs::metadata(&path));
let mut file = try!(File::open(&path));
let mut buf = vec![0u8; metadata.len() as usize];
try!(file.read(&mut buf));
buf.make_ascii_lowercase();
let mut str: &str = try!(str::from_utf8(&buf));