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/sh | |
# | |
# aktualna pogoda w Zaganiu | |
# coGhen(2o13.o7.19) | |
# | |
curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=1\&locCode\=EUR\|PL\|PL005\|ZAGAN | sed -n '/Currently:/ s/.*: \(.*\): | |
\([0-9]*\)\([CF]\).*/\2 °\3, \1/p' |
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/sh | |
############################################################################## | |
# skrypt do aktualizacji dynamicznych domen na http://freedns.afraid.org | |
# uruchamiac z cron'a co jakis czas np. co 30 minut: | |
# */30 * * * * $HOME/afraider > /dev/null 2>&1 | |
# | |
# by coghen@gmail.com [06-09-2009] | |
############################################################################### | |
katalog=$(pwd) | |
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 | |
# +--------------------------------------+ | |
# | megabekap v1.0 (coghen@12.07.2013) | | |
# | wymaga pakietu Megatools do pobrania | | |
# | z http://megatools.megous.com/ | | |
# +--------------------------------------+ | |
# konto mega.co.nz | |
megauser=user@gmail.com # mega.co.nz login | |
megapass='a<.bc#@*gRD' # mega.co.nz password |
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
<?php | |
function detect_city($ip) | |
{ | |
$default = 'Lokacja nieznana'; | |
$url = 'http://67.212.77.11/ip_locator.php?ip=' . urlencode($ip); | |
$content = file_get_contents($url); | |
if (preg_match('{<li>City : ([^<]*)</li>}i', $content, $regs)) | |
{ |
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
<?php | |
// | |
// by coGhen (14.06.2013) | |
// | |
$zajete=shell_exec('du -h -s /home/coghen |cut -c 1-5'); | |
$wolne=shell_exec('df -h |grep home |cut -c 35-40'); | |
echo("Zajete miejsce: "); |
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/sh | |
# skrypt wyciąga najważniejsze dane (tj. transfer w obecnym dniu oraz miesiącu) | |
# z vnstat i prezentuje je w przystępnej formie. | |
# | |
INTERFACES=${@:-eth0} | |
for IFACE in $INTERFACES; do | |
vnstat -i "$IFACE" --oneline | awk -v MONTH=$(date +%B) -F';' '{print "Transfery na interfejsie: "$2"\n\n - dzisiaj: "$6" (ściągnięto: "$4" / wysłano: "$5")\n - "MONTH": "$11" (ściągnięto: "$9" / wysłano: "$10")\n"}' | |
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
#include<SmartMatrix.h> | |
#include<FastLED.h> | |
#define kMatrixWidth 32 | |
#define kMatrixHeight 32 | |
byte CentreX = (kMatrixWidth / 2) - 1; | |
byte CentreY = (kMatrixHeight / 2) - 1; | |
#define NUM_LEDS (kMatrixWidth * kMatrixHeight) |