View make-kernel-build-dir.sh
#!/bin/bash -e
#
# Extracted from: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/linux
set -x
ARCH=$(uname -m)
KARCH=x86 # applies to x86_64 too (change for arm, etc.)
pkgdir=
View power-usage
#!/usr/bin/env python2
import os
def readfile(path):
f = open(path, 'r')
if not f:
return false
val = f.read()
f.close()
return val
View .tmux.conf
set -g default-terminal "screen-256color"
#set -g history-limit 10000
#set -g mode-mouse on
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
#set -g mouse-select-pane on
#set -g mouse-select-window on
#set -g mouse-resize-pane on
bind -n WheelUpPane copy-mode
bind -n S-down new-window
View rancher.sh
#!/bin/sh -e
# set -x
RANCHER_URL="rancher.mydomain.com"
PROJECT_ID="1a5" #id of my stack in rancher
CATTLE_ACCESS_KEY=MY_RANCHER_ACCESS_KEY
CATTLE_SECRET_KEY=MY_RANCHER_ACCESS_SECRET
TMP_FILE=$(mktemp)
View start-iso-vm.sh
#!/bin/sh -e
exec qemu-system-x86_64 -enable-kvm -cdrom $1 -m 1024
View async_controller.rb
# FROM: http://www.jonb.org/2013/01/25/async-rails.html @jbaudanza
# Modified to get it working.
module AsyncController
# This is the rack endpoint that will be invoked asyncronously. It will be
# wrapped in all the middleware that a normal Rails endpoint would have.
class RackEndpoint
attr_accessor :action
View play-random-music.sh
#!/bin/bash -e
PLAYER="mpv -vo null"
#PLAYER="mpg321"
MUSIC=$(find . -regextype posix-extended -iregex '.*(m4a|mp3|mp4|aac)$' | sort -R)
IFS=$'\n'
for file in $MUSIC
View ghost-in-the-shell-ordered-list.txt
Ghost in the shell - Ordered list of Movie and Series
=====================================================
Original:
- Ghost in the Shell (1995/10)
- Ghost in the Shell 2: Innocence (2004/3)
- (Series) Ghost in the Shell: Stand Alone Complex (2002/10 .. 2003/10, 26 episodes)
View gitcommit.nanorc
# Some parts from here : http://milianw.de/code-snippets/git-commit-message-highlighting-in-nano
# Some parts from here : https://github.com/serialhex/nano-highlight/blob/master/patch.nanorc
# syntax highlighting for git commit messages
syntax "patch" ".git/COMMIT_EDITMSG$"
# overlong lines
# color brightred "^.{70,}.+$"
# comment
View better-pmset-values
DestroyFVKeyOnStandby 1
Active Profiles:
Battery Power -1*
AC Power -1
Currently in use:
standbydelay 0
standby 0
halfdim 1
hibernatefile /var/vm/sleepimage
darkwakes 0