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 | |
# needs: | |
# - bash | |
# - xfce4-screenshooter | |
# - zenity | |
# - ImageMagick | |
# - Tesseract OCR (include the languages you want) | |
[ "$1" ] || exec xfce4-screenshooter -r -o $0 | |
TI=`mktemp` |
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 | |
# you will need to get the Windows TurboDB Exchange s/w, like this: | |
# # wget http://dataweb.de/download/turbodbtools/tdbdataX.zip | |
# # unzip tdbdataX.zip | |
# then, copy all files from C:\Documents and Settings\All Users\...\Zionworx\2.6\Data | |
# into the current working dir | |
# Then, run this script, then you can import the lyricue.xmlz into Lyricue | |
# You will also need: | |
# - wine (because the Linux exporter of TurboDB is broken) |
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
package net.teration.log4j.filter; | |
import java.util.regex.Pattern; | |
import java.util.regex.PatternSyntaxException; | |
import org.apache.log4j.Logger; | |
import org.apache.log4j.spi.Filter; | |
import org.apache.log4j.spi.LoggingEvent; | |
public class NDCMatchFilter extends Filter { |
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 | |
ODB=$(xbacklight -get) | |
while : | |
do | |
BR=`cat /sys/class/als/acpi_als0/illuminance` | |
echo -n $BR | |
[ $BR -lt 8 ] && BR=0 | |
DB=`echo "l($BR+1)*l($BR+1)" | bc -l` |
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
for i in $(grep -Eo "cpu[0-9]+" /proc/stat); do cpufreq-set -c ${i/cpu/} -g userspace ; done | |
bash -c 'while :;do grep -E "cpu[0-9]+" /proc/stat;sleep 0.2;done|gawk '"'"'BEGIN{getline MINF<"/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" ;getline MAXF<"/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"}{cn=$1;sub(/cpu/,"",cn);if(cn==0)for(i in cu){ocu[i]=cu[i];cu[i]=0;oci[i]=ci[i];ci[i]=0}pg=rshift(cn,1);for(i=2;i<=NF;i++){if(i!=5)cu[pg]+=$i;ci[pg]+=$i}if(pg*2!=cn){tf=200*(cu[pg]-ocu[pg])/(ci[pg]-oci[pg]);if(tf>100)tf=100;if(tf<0)tf=0;sc=tf*(MAXF-MINF)/100+MINF-300000;sc-=sc%100000;for(j=0;j<2;j++)print sc|"cat>/sys/devices/system/cpu/cpu"(pg*2+j)"/cpufreq/scaling_setspeed"}}'"'&" |
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
*/5 * * * * /bin/df /var/log/mysql -P | /bin/awk '/^\/dev/ { exit 100.0*$4/$2 < 10 }' || /usr/bin/mysql -u monitor -e "purge binary logs to '$(cd /var/log/mysql ; ls -1tr mysql-bin.[0-9]* | head -2 | tail -1)'" |
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 | |
IPADDR=192.168.22.120 | |
TARGETFOLDER=/media/data/Pictures/A55 | |
while :; do | |
while ! ping -c3 -w3 -q $IPADDR ; do sleep 10 ; done | |
echo ls | cadaver http://$IPADDR/DCIM > /tmp/listing |
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 | |
use strict; | |
use warnings; | |
use Net::Jabber; | |
use POSIX qw(strftime); | |
my %vars = map { s/^ICINGA//; $_=>$ENV{"ICINGA$_"} } grep /^ICINGA.+/, keys %ENV; | |
my $recip = $ENV{'JABBERADDRESS'}; |
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
# This is a 256 colors MidnightCommander color scheme | |
# based on the Xoria256 color scheme by Alexander Glyzov (isee@inbox.ru) | |
# Note you'll need mc > 4.7.5 for this scheme to work (256 colors support) | |
# Hint: compile from the git repository | |
[skin] | |
description=itSdark256 | |
256colors=true |
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 ruby | |
require 'yaml' | |
require 'puppet' | |
if ARGV[0] == 'config' | |
puts <<END | |
graph_args --base 1000 -l 0 -M | |
graph_vlabel value | |
graph_title Puppet stats |
OlderNewer