Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
bashing keybindings

Ronen narkisr

⌨️
bashing keybindings
View GitHub Profile
@narkisr
narkisr / gpg2qrcodes.sh
Created Jan 21, 2017 — forked from joostrijneveld/gpg2qrcodes.sh
Producing printable QR codes for persistent storage of GPG private keys
View gpg2qrcodes.sh
# Heavily depends on:
# libqrencode (fukuchi.org/works/qrencode/)
# paperkey (jabberwocky.com/software/paperkey/)
# zbar (zbar.sourceforge.net)
# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
View celestial.sh
# No warranties of any kind. Works for me.
# Make sure to edit all XXX marked places in this file before using it.
export CELESTIAL_LAST_JOB_FILE=~/.celestial.last-job
function C() {
# Expects "user:pass" in ~/.celestial-creds
u="$1"
shift
View install-mapnik-amazon-ami.sh
# 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 Dec 4, 2012 — forked from kamermans/build_mysql51.sh
Build MySQL 5.1 on Ubuntu 12.04 and later (5.1 is not available in Ubuntu repo)
View build_mysql51.sh
#!/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 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
narkisr / redis.clj
Created Jun 23, 2012
pallet redis crate
View redis.clj
(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]))