Skip to content

Instantly share code, notes, and snippets.

View ruslander's full-sized avatar

Ruslan Rusu ruslander

View GitHub Profile
@imathis
imathis / gist_tag.rb
Created June 15, 2011 17:58 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@martinrehfeld
martinrehfeld / Gemfile
Created July 21, 2011 08:42
Erlang "autotest" -- run your eunit suites automatically when changing files (uses rebar + Ruby guard)
source 'http://rubygems.org'
group :development, :test do
gem 'guard-shell'
gem 'rb-fsevent'
gem 'growl'
end
@freewind
freewind / Client.java
Created October 25, 2011 17:05
Simple socket server and client, to test the speed of java socket
import java.io.InputStream;
import java.net.Socket;
public class SimpleClient {
public static void main(String[] args) throws Exception {
Socket socket = new Socket("127.0.0.1", 6666);
InputStream input = socket.getInputStream();
long total = 0;
long start = System.currentTimeMillis();
@mythz
mythz / xhr.js
Created November 2, 2011 19:05
Standalone jQuery-like Ajax Client
//Adds $.xhr and jQuery-like $.ajax methods to the prescribed namespace.
//Inspired from David Flanagans excellent cross-platform utils http://www.davidflanagan.com/javascript5/display.php?n=20-1&f=20/01.js
//Includes underscore.js _.each and _.extend methods
//modified to behave like jQuery's $.ajax(), not complete.
(function($) {
var win=window, xhrs = [
function () { return new XMLHttpRequest(); },
function () { return new ActiveXObject("Microsoft.XMLHTTP"); },
function () { return new ActiveXObject("MSXML2.XMLHTTP.3.0"); },
function () { return new ActiveXObject("MSXML2.XMLHTTP"); }
@SteveSongMIT
SteveSongMIT / index.html
Created March 19, 2012 18:59
Simple Cowboy web server
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Cowboy test</title>
</head>
<body>
<h1>Woot!</h1>
<hr>
@SteveSongMIT
SteveSongMIT / captainflint.dtl
Created March 20, 2012 22:50
Simple Cowboy web server + ErlyDTL
<html>
<body>
GET squawk:<br />
{{ squawk_get }}<br /><br />
POST squawk:<br />
{{ squawk_post }}<br /><br />
@Jud
Jud / Price-Time Matching Engine.c
Created June 1, 2012 23:56
Price-Time Matching Engine
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
@martinrehfeld
martinrehfeld / Makefile
Created November 18, 2012 20:28 — forked from seth/Makefile
Template Makefile for Erlang projects
DEPS = $(CURDIR)/deps
DIALYZER_OPTS = -Wunderspecs
# List dependencies that should be included in a cached dialyzer PLT file.
# DIALYZER_DEPS = deps/app1/ebin \
# deps/app2/ebin
DEPS_PLT = {{name}}.plt
anonymous
anonymous / installVimerl
Created December 16, 2012 01:56
Install vimerl on ubuntu
# Create required directories
mkdir -p ~/.vim/autoload ~/.vim/bundle
# Install pathogen
wget -O ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim
echo "call pathogen#infect()" >> ~/.vimrc
# Install vimerl
wget -O vimerl.tar.gz https://github.com/jimenezrick/vimerl/tarball/master