This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "actor": "ArthurPai", | |
| "actor_attributes": { | |
| "email": "[email protected]", | |
| "gravatar_id": "94937b16f15f3b3b7f2795fe5bd0e49f", | |
| "location": "Taiwan", | |
| "login": "ArthurPai", | |
| "name": "Artuhr", | |
| "type": "User" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| void my_at_exit(void) { | |
| printf("I am doing things before exiting\n"); | |
| } | |
| int main(void) { | |
| atexit(my_at_exit); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import threading | |
| from multiprocessing.connection import Listener | |
| from multiprocessing.connection import Client | |
| from array import array | |
| def listen(): | |
| address = ('', 50000) | |
| listener = Listener(address) | |
| conn = listener.accept() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'scrooloose/nerdtree' | |
| Plugin 'scrooloose/syntastic' | |
| Plugin 'tpope/vim-fugitive' " git integration for things like Gblame | |
| Plugin 'lervag/vimtex' | |
| Plugin 'tpope/vim-rails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'scrooloose/nerdtree' | |
| Plugin 'scrooloose/syntastic' | |
| Plugin 'tpope/vim-fugitive' | |
| Bundle 'lervag/vim-latex' | |
| Plugin 'tpope/vim-rails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from multiprocessing.connection import Client | |
| if len(sys.argv) == 1: | |
| print "Usage:" | |
| print " sendmsg.py <host> <port> <message>" | |
| print " sendmsg.py <message> (default port:5000, host:localhost)" | |
| args = sys.argv[1:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Very, very, very, VERY bad CSV parser. If you're wondering, I wrote this because | |
| /// rustc-serializer was not working at some point, and needed a simple parser. | |
| pub fn parse_csv(s : String) -> Vec< Vec<String> > { | |
| let mut buff: String = String::new(); | |
| let mut record: Vec<String> = Vec::new(); | |
| let mut ret: Vec< Vec<String> > = Vec::new(); | |
| for c in s.chars() { | |
| println!("{}.", c); | |
| match c { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If airline is not having proper colors, add this to your bashrc file | |
| if [ -e /usr/share/terminfo/x/xterm-256color ]; then | |
| export TERM='xterm-256color' | |
| else | |
| export TERM='xterm-color' | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Shorthand to print | |
| procedure p(str : Wide_String) renames Ada.Wide_Text_IO.Put_Line; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <netdb.h> | |
| /* somewhat modified version of Paul Kryzanowski's example | |
| * https://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html | |
| */ |