Skip to content

Instantly share code, notes, and snippets.

View isa's full-sized avatar
☀️
Working, whatd'ya think..

Isa Goksu isa

☀️
Working, whatd'ya think..
View GitHub Profile
@isa
isa / README.md
Last active December 11, 2015 07:48 — forked from filler/README.md

RHEL 6.3 veewee templates for vagrant use

These templates can be used to feed to veewee to spin up an el6 basebox for use with vagrant.

There are some coded values in definition.rb and ks.cfg which point at Yale-ishness. Amend to point at local RHEL iso/yum repo.

Built successfully with veewee 0.2.3, vagrant 1.0.3, Virtualbox 4.1.18.

Config Management

#
# Run as root
# $ bash <(curl -s https://raw.github.com/gist/1631411)
#
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl \
libssl-dev \
@isa
isa / gist:3850671
Created October 8, 2012 04:09
Syntax highlighting for terminal with pygmentize
#!/usr/bin/env bash
if [ ! -t 0 ];then
file=/dev/stdin
elif [ -f $1 ];then
file=$1
else
echo "Usage: $0 code.c"
echo "or e.g. head code.c|$0"
exit 1
@isa
isa / gist:3735531
Created September 17, 2012 04:22 — forked from xavi/gist:3729307
Fast, simple, powerful templating in Clojure
;; Call the renderer-fn macro with a template and it returns a function optimized to render it.
;; This happens at compile-time.
;; At run-time, you call this function with the parameters that will be interpolated into the template,
;; typically (but not limited to) a map.
;;
;; Useful in i18n for variable interpolation, for example. I'm using this to add internationalization
;; support to https://github.com/xavi/noir-auth-app
;; See usage at the end.
@isa
isa / gist:3068581
Created July 7, 2012 23:33
jQuery Even PubSub Example
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Some title</title>
<link rel="stylesheet" href="stylesheets/main.css" type="text/css" />
<script type="text/javascript" charset="utf-8" src="javascripts/modernizr-2.5.3.min.js"></script>
<script type="text/javascript" charset="utf-8" src="javascripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="javascripts/main.js"></script>
@isa
isa / gist:3016089
Created June 29, 2012 05:51
springmvc-router evaluation
My route file is say:
GET /hello/{id} controller.do
GET /hello controller.dont
public String do(@PathVariable String id) {
// id is 123
@isa
isa / gist:2963073
Created June 21, 2012 00:11
Install PEAR to OSX Lion
sudo php /usr/lib/php/install-pear-nozlib.phar
pear config-set php_ini /private/etc/php.ini
pecl config-set php_ini /private/etc/php.ini
sudo pear upgrade-all
@isa
isa / latency.txt
Created June 1, 2012 03:39 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
@isa
isa / gist:2707623
Created May 16, 2012 05:09
OSX Say Command
say -v Agnes "hello world"
Female Voices
Agnes - relatively natural female voice
Kathy - sounds like a computer, kind of like the computer voice
Princess – kind of sounds like an old lady
Vicki - most natural, kind of whispery
Victoria – computery sounding
Male Voices
@isa
isa / gist:2699078
Created May 15, 2012 04:16
TextMate 2 .tm_properties

This is all based on the [alpha release][1].

Properties

From the built-in help system:

For many settings TextMate will look for a .tm_properties file in the current folder and in any parent folders (up to the user’s home folder).

These are simple setting = value listings where the value is a format string in which other variables can be referenced.