Skip to content

Instantly share code, notes, and snippets.

View narkisr's full-sized avatar
⌨️
bashing keybindings

Ronen narkisr

⌨️
bashing keybindings
View GitHub Profile
@narkisr
narkisr / install-mapnik-amazon-ami.sh
Created December 10, 2012 15:09 — forked from springmeyer/install-mapnik-amazon-ami.sh
Mapnik on Amazon Linux AMI (Fedora)
# http://aws.amazon.com/amazon-linux-ami/
# http://aws.amazon.com/amazon-linux-ami/faqs/
# login
ssh -i key.pem ec2-user@ec2...compute.amazonaws.com
# update
sudo yum -y update
sudo yum -y upgrade
@narkisr
narkisr / build_mysql51.sh
Created December 4, 2012 22:12 — forked from kamermans/build_mysql51.sh
Build MySQL 5.1 on Ubuntu 12.04 and later (5.1 is not available in Ubuntu repo)
#!/bin/bash
set -e
cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
make
@narkisr
narkisr / .Xdefaults
Created November 24, 2012 20:15 — forked from yevgenko/.Xdefaults
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@narkisr
narkisr / Monaco_Linux-Powerline.ttf
Created November 24, 2012 18:49 — forked from epegzz/Monaco_Linux-Powerline.ttf
Monaco for vim-powerline
@narkisr
narkisr / dissoc-idx.clj
Created August 28, 2012 16:24
A index selection from a vector in Clojure
(defn index-exclude [r ex]
"Take all indices execpted ex"
(filter #(not (ex %)) (range r)))
(defn dissoc-idx [v & ds]
(map v (index-exclude (count v) (into #{} ds))))
(dissoc-idx [1 2 3] 1 2)
'(1)
@narkisr
narkisr / incanter-webui.clj
Created August 15, 2012 13:59
Using Noir and incanter
(ns simple_server
(:gen-class)
(:use [noir.server :only (start load-views)])
)
(load-views "src/simple_web_app")
(defn -main [& m]
(let [port (Integer. (get (System/getenv) "PORT" "8080"))]
(start port {:mode :dev :ns 'stats-web})))
@narkisr
narkisr / gemspec-fix.sh
Created August 10, 2012 23:49
Fixing invalid gemspec
# see http://biboyatienza.blogspot.co.il/2011/11/invalid-gemspec-in-varlibgems18specific.html
sudo sed -i 's/ 00:00:00.000000000Z//' /var/lib/gems/1.8/specifications/*
@narkisr
narkisr / phpvirtualbox upstart
Created July 31, 2012 23:35
Loading phpvirtualbox and vms on boot using upstart
#/etc/init.d/vboxdrv, add to the end of the start function
/sbin/initctl emit vboxdrv-started
# this triggers two upstart jobs
# /etc/init/phpvirtualbox.conf
description "php virtualbox server"
@narkisr
narkisr / .ackrc
Created July 25, 2012 23:30
.ackrc
--type-set=clojure=.clj
--type-set=snippet=.snippet
--type-set=groovy=.groovy
--type-set=yml=.yml
--type-set=net=.cl
--type-set=json=.json
--type-set=jsp=.jsp
--type-set=jspf=.jspf
--type-set=ruby=.rb
--type-set=markdown=.md
@narkisr
narkisr / gist:3162922
Created July 23, 2012 10:02
enabling ulimit memlock ubuntu 12.04
# /etc/security/limits.conf
ubuntu hard memlock 8388608
root hard memlock 8388608
# /etc/pam.d/common-session
session required pam_limits.so
Note this seems to be working altough ulimit -l still reports 64