This file contains 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
clear Lock | |
clear Control | |
keycode 9 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock | |
keycode 37 = Escape NoSymbol Escape NoSymbol Escape | |
keycode 66 = Control_L NoSymbol Control_L NoSymbol Control_L | |
keycode 135 = Multi_key Multi_key Multi_key Multi_key | |
add Lock = Caps_Lock | |
add Control = Control_L Control_R |
This file contains 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 | |
# run all the execuable scripts in the corresponding hook.d directory | |
# e.g. if this is the update hook, run all scripts in update.d/ | |
while read oldrev newrev ref | |
do | |
for file in `find ./$0.d/ -type f` | |
do | |
if [ -x $file ] |
This file contains 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
--- setup.py 2012-02-03 13:15:50.000000000 -0800 | |
+++ setup.py 2012-02-03 13:15:50.000000000 -0800 | |
@@ -44,9 +44,8 @@ | |
arrayobject_h_include = [os.path.join(sys.prefix, | |
"Lib/site-packages/numpy/core/include")] | |
else: | |
- arrayobject_h_include = [os.path.join(sys.prefix, | |
- "lib/python%s.%s/site-packages/numpy/core/include" | |
- % sys.version_info [:2])] | |
+ import numpy.distutils.misc_util |
This file contains 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 | |
# Author: Jonathan Harker <[email protected]> | |
REPO=GitHubUser/GitHubRepo.git | |
KEY="/full/path/to/github.key" | |
case "$1" in | |
# Use case 1: | |
# Call 'github.sh all' in post-receive hook |
This file contains 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 zsh | |
# | |
# Works best with blinking text; the last heart will blink | |
# when you have less than 25% of your battery life remaining. | |
FULL="$(cat /sys/class/power_supply/BAT0/charge_full)" | |
NOW="$(cat /sys/class/power_supply/BAT0/charge_now)" | |
BATTERY=$(echo "scale=25;$NOW/$FULL" | bc) | |
if [[ $BATTERY -lt .25 ]]; then |
This file contains 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 python | |
# | |
# Shamelessly stolen from https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py | |
# | |
# Deletes all indices with a datestamp older than "days-to-keep" for daily | |
# if you have hourly indices, it will delete all of those older than "hours-to-keep" | |
# | |
# This script presumes an index is named typically, e.g. logstash-YYYY.MM.DD | |
# It will work with any name-YYYY.MM.DD or name-YYYY.MM.DD.HH type sequence | |
# |
This file contains 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
include: | |
- java | |
elasticsearch: | |
pkg: | |
- installed | |
- sources: | |
- elasticsearch: http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.deb | |
service.running: | |
- require: |
This file contains 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 bash | |
# The pattern `exec > $X 2>&1` does two things: the last bit redirects standard | |
# error to go to standard output, and the first bit sends standard output to the | |
# file $X. Here our $X is the process substitution `>( $process )` which takes | |
# the standard input of $process and presents it as a file handle. Putting | |
# these two together, we have both our standard out and our standard error | |
# going to the standard input of $process. Our $process here first runs tee, | |
# which sends its standard input to both standard out and to the file listed. | |
# We then pipe our standard out into the logger command, which sends it to syslog. |
This file contains 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
{% macro proxy(site, server, port, http=True, https=False) -%} | |
extend: | |
{{ pillar['package']['apache'] }}: | |
service: | |
- watch: | |
- file: /etc/{{ pillar['package']['apache'] }}/sites-enabled/{{ site }} | |
/etc/{{ pillar['package']['apache'] }}/sites-enabled/{{ site }}: | |
file.managed: |
This file contains 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 | |
$SALT_HOME=/var/local/salt | |
sudo useradd -m -d $SALT_HOME -r -U -c "Salt Master Daemon" salt | |
mkdir salt | |
cat > salt/master <<EOF | |
user: salt |
OlderNewer