Skip to content

Instantly share code, notes, and snippets.

/tmp/ruby-build.20140402203247.23283 ~
ruby-2.1.1/
ruby-2.1.1/sprintf.c
ruby-2.1.1/regerror.c
ruby-2.1.1/hash.c
ruby-2.1.1/eval_intern.h
ruby-2.1.1/parse.h
ruby-2.1.1/main.c
ruby-2.1.1/regenc.h
ruby-2.1.1/misc/
@mkroman
mkroman / string.cpp
Last active December 28, 2015 09:39
#include <string>
#include <cstring>
#include <iostream>
char BAND_COLOR_CODE[10][8] =
{
"black", "brown", "red", "orange", "yellow",
"green", "blue", "violet", "grey", "white" };
int find_cstring_in_array(char array[][8], size_t array_size, const char* needle)
@echo off
taskkill /IM "audiorepeater.exe" /IM "audiorepeater_ks.exe" /T >nul
call :audiorepeater TRUE "Virtual Cable 1" "Realtek HD Audio output"
call :audiorepeater FALSE "Line 2 (Virtual Audio Cable)" "Line 1 (Virtual Audio Cable)"
goto :EOF
:audiorepeater
mk@maero ~/Projects/qweb/ajaxterm % python2 ./configure
Configuring prefix= /usr/local port= 8022
mk@maero ~/Projects/qweb/ajaxterm % python2 ./configure --help
Usage: configure [options]
Options:
-h, --help show this help message and exit
--prefix=PREFIX installation prefix (default: /usr/local)
--confdir=CONFDIR configuration files directory prefix (default: /etc)
--port=PORT set the listening TCP port (default: 8022)
UI = window.UI ?= new Object
class UI.Grid
@DefaultOptions = {
width: 1280,
height: 720,
verticalSpacing: 30,
horizontalSpacing: 30,
@mkroman
mkroman / .vimrc
Created September 15, 2013 23:18
execute pathogen#infect()
" Let's have a gigantic history - we have the memory for it!
set history=1000
" Enable filetype plugins
if has("autocmd")
autocmd filetype plugin indent on
endif
" Set the minimal number of lines displayed above and below the current line
#include <iostream>
#include "visichat/controller.hpp"
using namespace VisiChat;
Controller::Controller()
{
m_eventBase = event_base_new();
}
@mkroman
mkroman / gist:1420936
Created December 2, 2011 00:23 — forked from fender21/gist:1420876
Better way to route?
post :index do
if params.key?("create")
path = Padrino.root("tmp")
File.open(File.join(path, "#{params[:docId]}.pdf"), "w") do |file|
file.write request.body.read.force_encoding("UTF-8")
status 200
end
end
end
@mkroman
mkroman / Network.cpp
Created November 17, 2011 01:42
Uncrustify configuration inspired by Google's C++ styleguide.
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <iostream>
#include <stdarg.h>
#include <stdio.h>
@mkroman
mkroman / .astylerc
Created November 1, 2011 01:24
AStyle-style inspired by googles C++ styleguide.
mode=c
pad-oper
pad-header
unpad-paren
convert-tabs
break-blocks
indent=tab=4
lineend=linux
indent-switches
brackets=attach