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
# 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 |
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
# Setting up sun-jdk | |
class backend::jdk { | |
if($operatingsystem =~ /Ubuntu|Debian/){ | |
include apt | |
apt::ppa { 'ppa:webupd8team/java': } | |
package{'oracle-java6-installer': | |
ensure => present, | |
require => [Apt::Ppa['ppa:webupd8team/java'],Exec['skipping license approval']] |
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
# http://aws.amazon.com/amazon-linux-ami/ | |
# http://aws.amazon.com/amazon-linux-ami/faqs/ | |
# login | |
ssh -i key.pem [email protected] | |
# update | |
sudo yum -y update | |
sudo yum -y upgrade |
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
#!/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 |
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
!------------------------------------------------------------------------------- | |
! Xft settings | |
!------------------------------------------------------------------------------- | |
Xft.dpi: 96 | |
Xft.antialias: false | |
Xft.rgba: rgb | |
Xft.hinting: true | |
Xft.hintstyle: hintslight |
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) |
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
# 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
#/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" |