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
syn on | |
set number | |
set tabstop=2 | |
set expandtab | |
set shiftwidth=2 | |
set bg=dark | |
map <leader>jt <Esc>:%!json_xs -f json -t json-pretty<CR> | |
au BufRead,BufNewFile *.json set filetype=json |
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
log-scale:yes |
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
syn on | |
set number | |
set tabstop=2 | |
set expandtab | |
set shiftwidth=2 |
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 | |
# you can copy this to /usr/local/bin | |
# and then chmod 775 it | |
now=`date +%Y-%m-%d:%H:%M%s` | |
echo "saving: ~/Pictures/screenshot-$now.jpg" | |
import ~/Pictures/screenshot-"$now".jpg |
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 | |
echo "how many pictures you want to take?" | |
read hmany | |
echo "at which interval" | |
read interval | |
counter=1 | |
while [ $counter -le $hmany ] |
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 | |
echo "how long do you want to take pictures? (in seconds)" | |
read hlong | |
echo "at which interval (in seconds)" | |
read interval | |
echo "please provide a prefix to name the pictures" | |
read prefix | |
hlongms=$(($hlong*1000)) |
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 | |
pictname=`date +%s` | |
raspistill -o $pictname.jpg -q 100 -v -ex auto -awb sun -mm matrix -t 300 |
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 | |
error_reporting(0); | |
$data = file('failIP.text'); | |
foreach ($data as $line) { | |
$host = trim($line); | |
$country = geoip_country_name_by_name($host); | |
if ($country) { | |
echo 'Host '.$host. ' is located in: '.$country. "\n"; |
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 | |
# script to change the volume using amixer + zenity | |
current_vol=$(amixer -c 0 get 'Master' |tail -1| sed 's/.*\[\([0-9][0-9]\%\)\].*/\1/g'| sed 's/%//g') | |
function volume { | |
VOLVALUE=$(zenity --scale --value=$current_vol --text "set volume") | |
CMD="amixer -c 0 set 'Master' $VOLVALUE%" | |
echo $CMD |
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 | |
# launcher.sh | |
while true; do if [[ ! $(ps -ef |egrep "python.*[m]ain") ]] ; then echo "server down"; ./main.py; fi; sleep 10; done |