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 / .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
@narkisr
narkisr / 8192cu-wifi
Created July 20, 2012 20:49
8192cu Wifi on your pie
See http://www.raspberrypi.org/phpBB3/viewtopic.php?t=6256 this desribes how to setup wifi for 8192cu based adapters,
Note that following http://elinux.org/RPi_edimax_EW-7811Un, looks like the above script does thing differently,
The /etc/network/interfaces:
iface wlan0 inet dhcp
wpa-ssid "ssid"
wpa-psk "password"
@narkisr
narkisr / redis.clj
Created June 23, 2012 23:48
pallet redis crate
(ns pallet.crate.redis
"Simple redis crate for pallet,
with a DSL for configuration"
(:require [pallet.parameter :as parameter]
[pallet.action.package :as pkg]
[pallet.action.user :as user]
[pallet.action.directory :as dir]
[pallet.action.remote-file :as file]
[pallet.action.service :as service]))
@narkisr
narkisr / cron scruber
Created December 30, 2011 00:32
zfs scrubing
#!/usr/bin/env ruby
require 'gmail'
def email_scrub_run(status)
gmail = Gmail.new('foo', 'bar')
gmail.deliver do
to "dest@gmail.com"
subject "Your scheduled Zfs scrub was just performed "
@narkisr
narkisr / zfs_notify_on_error.rb
Created December 30, 2011 00:18
zfs pool scrub and daily status email
#!/usr/bin/env ruby
require 'gmail'
def email_scrub_status(status)
gmail = Gmail.new('u', 'pass')
gmail.deliver do
to "dest@gmail.com"
subject "Zfs check result on Host"
@narkisr
narkisr / gist:1313490
Created October 25, 2011 16:59
Ugly solution for gradles cache access issue in multi build enviroment (jenkins)
GRADLE_APP_BASE_NAME=`basename "$0"`
STARTER_MAIN_CLASS=org.gradle.launcher.GradleMain
# my ugly extension point
CACHE_HOME=/var/lib/jenkins/caches/$JOB_NAME
mkdir -p $CACHE_HOME
cp /var/lib/jenkins/.gradle/init.gradle $CACHE_HOME
exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
@narkisr
narkisr / ubunt-desktop.seed
Created September 30, 2011 23:23
An Ubuntu desktop preseed file
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string
# network
d-i netcfg/get_nameservers string
d-i netcfg/get_ipaddress string
d-i netcfg/get_netmask string 255.255.255.0
# NOTE:
# This is just a sourced bash script, so think what you put here.
# If you'd like to use $ sign, you must enclose string in '' or escape it.
# If you'd like to use some other variable, feel free to use it.
# In booleans 1, 'y', 't', 'yes', 'true' and 'on' evaluate as true.
# Whether to log progress verbosely, or just print a plain summary at the end.
VERBOSE=1
Tue Jan 18 22:37:21 IST 2011
+ hook_exec pre-umount
+ local hooktype fn
+ hooktype=pre-umount
+ [ -d /etc/udev/uam-hooks/pre-umount ]
+ [ -f /etc/udev/uam-hooks/pre-umount/* ]
+ debug Starting uam umounter on /dev/sdc1.
+ bool 1
+ [ -n ]
+ return 0