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
cd conf/evolutions/default | |
mkdir ../extracted | |
for i in *.sql ; do awk '/# --- !Ups/{flag=1;next}/# --- !Downs/{flag=0}flag' "$i" > ../extracted/"$i" ; done |
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
#!/usr/bin/env bash | |
git log -1 --format='format:git.hash="%H" | |
git.date="%ci" | |
git.ref="%d"' > include.git.conf |
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
import static java.util.Arrays.asList; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import org.junit.Test; | |
import com.google.common.collect.ImmutableList; | |
public class MyMatchersTest { | |
@Test | |
public void testSameAsSet() throws Exception { |
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 | |
exec kdialog --title note --passivepopup "$*" 5 |
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 | |
PID=$1 | |
if [ -z "$PID" ]; then | |
echo "no PID given" | |
exit 1 | |
fi | |
while [[ ( -d "/proc/$PID" ) && ( -z `grep zombie "/proc/$PID/status"` ) ]]; do | |
sleep 0.5 | |
done |
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 | |
fifo_name=$1; | |
if [ -z "$1" ]; then | |
echo "Usage "`basename $0`": <PATH>" | |
exit 1 | |
fi | |
[ -p "$fifo_name" ] || mkfifo "$fifo_name"; | |
chmod a+rw "$fifo_name" |
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 | |
fifo_name=$1; | |
if [ -z "$1" ]; then | |
echo "Usage "`basename $0`": <PATH>" | |
exit 1 | |
fi | |
[ -p "$fifo_name" ] || mkfifo "$fifo_name"; | |
chmod a+rw "$fifo_name" |
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
nmap -sS -p 5222 --open chat.hipchat.com | grep open 2>&1 > /dev/null |
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
# m h dom mon dow command | |
30 12 * * Mon,Wed,Fri /usr/bin/withbackupdevice /usr/bin/backup | |
# Every first tuesday | |
30 12 * * * [ `/bin/date +%u` -eq 2 -a `/bin/date +%e` -lt 8 ] && /usr/bin/withbackupdevice /usr/bin/archive |
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 -x | |
function failure() { | |
echo "backup failed " `date` >> /var/log/backup-mount-`date +%Y-%m-%d` | |
exit | |
} | |
function kill_childs() { |