View add_frozen_heading.rb
# Call: ruby add_frozen_heading.rb PATH_TO_FOLDER
dir = ARGV[0] || ''
if !Dir.exist?(dir)
puts 'Missing folder.'
exit
end
def check_headers(dir)
# puts "Inspect #{dir}"
View ruby_prof_diff.rb
require 'pp'
require 'ostruct'
require 'cgi'
class CallChild
attr_accessor(
:file,
:method,
:callee_called,
:callee_line,
View diff_inverter.cpp
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
int main(int argc, char* argv[]) {
ifstream file(argv[1]);
string s;
View mod_timing.c
#include "httpd.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include <time.h>
#include <syslog.h>
/**
* Definitions.
View ttymindmap.rb
# Usage:
# - Start new mindmap:
# `ruby ttymindmap.rb`
# - Open Freemind format MM mindmap:
# `ruby ttymindmap.rb <PATH-TO-MM-FILE>`
#
# Press `h` key when running for help.
require 'nokogiri'
View maze.rb
EMPTY = 0x0
UP = 0x1
RIGHT = 0x2
DOWN = 0x4
LEFT = 0x8
# Maze generator class.
class Generator
def initialize(w, h)
View json_concurrent.rs
use std::collections::HashMap;
use std::thread::{self, sleep};
use std::time;
use std::sync::{mpsc, Arc};
macro_rules! char_token {
($c:expr, $t:ident) => ({
let mut value = String::new();
value.push($c);
Some(Token{ttype: TokenType::$t, value:value})
View chip8.py
"""
Chip8 emulator.
"""
import array
import random
import pygame
# 4K.
View threaded_qs.java
package com.company;
class QuickSortThreaded {
private int[] l;
QuickSortThreaded(int[] l) {
this.l = l;
long start = System.nanoTime();
new Sorter(l, 0, l.length - 1).sort(0, l.length - 1);
View wake_queue.go
package main
import (
"fmt"
"sync"
"time"
)
type ElemType int32