Skip to content

Instantly share code, notes, and snippets.

bashing keybindings

Ronen narkisr

bashing keybindings
View GitHub Profile
narkisr /
Created Apr 21, 2013
Document scanning 101
# printer setup
sudo aptitude install hplip simple-scan
# Batch scan
sudo scanimage -b --batch-count=5 --batch-start=1 --source ADF --mode Gray
# converting to PDF
/usr/bin/gm convert *.pnm result.pdf
narkisr / jdk.pp
Last active Oct 13, 2015
Setting JDK on Ubuntu or Centos/Redhat systems
View jdk.pp
# Setting up sun-jdk
class backend::jdk {
if($operatingsystem =~ /Ubuntu|Debian/){
include apt
apt::ppa { 'ppa:webupd8team/java': }
ensure => present,
require => [Apt::Ppa['ppa:webupd8team/java'],Exec['skipping license approval']]
# login
ssh -i key.pem
# update
sudo yum -y update
sudo yum -y upgrade
narkisr /
Created Dec 4, 2012 — forked from kamermans/
Build MySQL 5.1 on Ubuntu 12.04 and later (5.1 is not available in Ubuntu repo)
set -e
cd ~/
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'
narkisr / .Xdefaults
Created Nov 24, 2012 — forked from yevgenko/.Xdefaults
URxvt settings with solarized theme
View .Xdefaults
! Xft settings
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
narkisr / dissoc-idx.clj
Created Aug 28, 2012
A index selection from a vector in Clojure
View dissoc-idx.clj
(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)
narkisr / incanter-webui.clj
Created Aug 15, 2012
Using Noir and incanter
View incanter-webui.clj
(ns simple_server
(: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 /
Created Aug 10, 2012
Fixing invalid gemspec
# see
sudo sed -i 's/ 00:00:00.000000000Z//' /var/lib/gems/1.8/specifications/*
narkisr / phpvirtualbox upstart
Created Jul 31, 2012
Loading phpvirtualbox and vms on boot using upstart
View phpvirtualbox 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"