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 | |
rm -f ./mux.sql; | |
rm -f ./tmp.list; | |
RES=`echo ""` | |
ITEM=`echo ""` | |
for file in `git ls-files` | |
do | |
HASH=`git rev-list HEAD $file | tail -n 1` | |
DATE=`git show -s --format="%ct" $HASH --` | |
ITEM=$(printf "%s %s\n" $DATE $file >> tmp.list) |
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
<?php | |
/** | |
* Clear all assigned variables | |
* | |
* Clears all variables assigned to Zend_View either via {@link assign()} or | |
* property overloading ({@link __set()}). | |
* | |
* @return void | |
*/ | |
public function clearVars() |
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 | |
# Interactive PoPToP install script for an OpenVZ VPS | |
# Tested on Debian 5, 6, and Ubuntu 11.04 | |
# April 2, 2013 v1.11 | |
# Author: Commander Waffles | |
# http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/ | |
echo "######################################################" | |
echo "Interactive PoPToP Install Script for an OpenVZ VPS" | |
echo |
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
# last job | |
sudo salt-run jobs.list_jobs | tac | grep -P ^'.*':$ -m 1 -B 9999 | tac |
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
<?php | |
/** | |
* INI configurations compare | |
* | |
* Usage: php compare.php file1.ini file2.ini | |
* Result: Will export sorted arrays into *.res files to use with normal diff tool | |
*/ | |
$x = parse_ini_file($argv[1],true); | |
$y = parse_ini_file($argv[2],true); | |
ksort($x); |
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
dataQuery = { | |
"query" : { | |
"custom_filters_score" : { | |
"query" : { | |
"match" : { "_all" : query } | |
}, | |
"filters" : [ | |
{ | |
"filter" : { "term" : {"_type" : "ticket"} }, | |
"boost" : 1.5 |
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 command { | |
command_name check_rbl | |
command_line /opt/check_rbl/check_rbl -t 60 -H $HOSTADDRESS$ \ | |
-s dnsbl.ahbl.org \ | |
-s cbl.abuseat.org \ | |
-s dnsbl.cyberlogic.net \ | |
-s bl.deadbeef.com \ | |
-s spamtrap.drbl.drand.net \ | |
-s spamsources.fabel.dk \ | |
-s 0spam.fusionzero.com \ |
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
USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |
elastics 20 0 9005m 2,6g 34m S 6,0 33,0 2779:33 java | |
logstash 39 19 1059m 409m 6332 S 3,9 5,1 3352:36 java | |
root 20 0 259m 41m 3392 S 0,1 0,5 4:51.60 salt-minion | |
root 20 0 737m 126m 3792 S 0,1 1,6 28:26.23 node |
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
[alias] | |
; creates timestamped branch rst-XXXXX and pushes it to default remote (origin) | |
rst = "!rst() { export tmpBranch=rst-$(date +%s) && git add -A && git checkout -b $tmpBranch && git commit -m 'WIP remote stash' && git push --set-upstream origin $tmpBranch; }; rst" |
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 | |
grep http /etc/salt/minion.d/settings.conf | cut -c6- | xargs -n1 git clone | |
find /home/tomas/ -type d -name "*formula" -exec git --git-dir={}/.git --work-tree={} pull origin master \; | |
find /home/tomas/ -type d -name "*formula" -exec sh -c "git --git-dir={}/.git --work-tree={} archive master | tar -x --strip-components 0 -C /srv/salt/" \; |