This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'gmail' | |
def email_scrub_status(status) | |
gmail = Gmail.new('u', 'pass') | |
gmail.deliver do | |
to "[email protected]" | |
subject "Zfs check result on Host" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'gmail' | |
def email_scrub_run(status) | |
gmail = Gmail.new('foo', 'bar') | |
gmail.deliver do | |
to "[email protected]" | |
subject "Your scheduled Zfs scrub was just performed " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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}))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |