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/perl -w | |
use strict; | |
use v5.10; | |
use Proc::Daemon; | |
use Sys::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
define data | |
foo | |
bar | |
baz | |
endef | |
export data | |
all: | |
@echo "$$data" |
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 | |
this=$(basename $0); # vim|gvim|rvim etc... | |
desktop=desktop_$(xprop -root -notype _NET_CURRENT_DESKTOP | perl -pe 's/.*?= (\d+)/$1/') | |
number_desktop=$(xprop -root -notype _NET_NUMBER_OF_DESKTOPS | perl -pe 's/.*?= (\d+)/$1/') | |
viewport=viewport_$(xprop -root -notype _NET_DESKTOP_VIEWPORT | perl -pe 's/.*?= (\d+), (\d+)/$1x$2/') | |
if [ $number_desktop = 1 ]; then | |
desktop=$viewport; | |
fi |
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 | |
# This script takes the mediawiki trunk extension git repository and splits them into one | |
# repository for each extension | |
# | |
# Warning: this can take some time | |
# | |
# Specify the path to your copy of the extension repo below: | |
MW_EXT_GIT=$HOME/public_html/mediawiki-trunk-extensions |
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/sh | |
# mostly default pre-commit hook | |
if git-rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi |
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
if [ "$allowjsconsole" != "true" ]; then | |
jsfiles=$(git diff --cached --name-only --relative $against | sed -n '/\.js$/p'); | |
if [ -n "$jsfiles" ] && | |
[ -n "$( git diff --cached -Sconsole. $jsfiles | sed -n 's/console\.\(\w\+\)(.*\?)/&/p')" ]; | |
then | |
echo "Error: Attempt to commit javascript with js console usage." | |
echo | |
echo "This might upset the master people..." | |
echo | |
echo "if you don't care about their wishes, you can disable" |
NewerOlder