Skip to content

Instantly share code, notes, and snippets.

View zonyitoo's full-sized avatar
💭
I may be slow to respond.

ty zonyitoo

💭
I may be slow to respond.
View GitHub Profile
use libc;
use simd;
use detail::{align_down, mut_offset};
use context::InitFn;
// windows requires saving more registers (both general and XMM), so the windows
// register context must be larger.
#[cfg(windows)]
#[repr(C)]
@zonyitoo
zonyitoo / Preferences.subllime-settings
Created May 25, 2015 10:56
Windows Sublime Text Settings
{
"bold_folder_labels": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"color_scheme": "Packages/User/SublimeLinter/cobalt2 (SL).tmTheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"font_face": "Inconsolata",
"font_options":
@zonyitoo
zonyitoo / worksteal.rs
Created May 13, 2015 03:16
Rust Coroutine with work-stealing scheduler demo
#![feature(scoped)]
extern crate coroutine;
extern crate num_cpus;
extern crate deque;
#[macro_use] extern crate log;
extern crate env_logger;
use std::thread;
use std::sync::mpsc::{channel, Sender, Receiver, TryRecvError};
@zonyitoo
zonyitoo / PrimeSumMR.rs
Last active April 14, 2017 05:29
Sum of primes that not greater than N, with Rust and Miller-Rabin primality test
extern crate rand;
extern crate chrono;
use std::iter::range_step_inclusive;
use chrono::Local;
const MAX_N: u64 = 10_0000_0000;
fn main() {
@zonyitoo
zonyitoo / rustcc.rustup.sh
Created March 7, 2015 01:45
Rustcc rustup.sh
#!/bin/sh
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
@zonyitoo
zonyitoo / Argo.java
Created December 9, 2012 13:55
SYSU Argo api JAVA
package edu.sysu.bbs;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
@zonyitoo
zonyitoo / .bashrc
Created November 29, 2012 15:42 — forked from marioBonales/.bashrc
Default .bashrc for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@zonyitoo
zonyitoo / .vimrc
Created November 29, 2012 11:30 — forked from humiaozuzu/.vimrc
vimrc for servers
syntax enable
filetype plugin indent on
set bg=dark
" Stop backup files
set nobackup
set nowritebackup
set noswapfile
" better search