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
echo 'DROP TABLE munin;' > munin.sql | |
echo 'CREATE TABLE munin (id SERIAL PRIMARY KEY, node VARCHAR(10), data VARCHAR(50), value FLOAT, time TIMESTAMP WITH TIME ZONE);' >> munin.sql; | |
echo 'BEGIN;' >> munin.sql; | |
for rrd in *rrd; | |
do | |
rrdtool dump $rrd $rrd.xml; | |
host=`echo $rrd | sed 's/\(.*\)_\(.*\)\.rrd/\1/'`; | |
data=`echo $rrd | sed 's/\(.*\)_\(.*\)\.rrd/\2/'`; | |
sed -n "s@.*-- \(.* CEST\).*<v>\(.*\)</v></row>@INSERT INTO munin (node,data,value,time) VALUES (\'$host\',\'$data\',\'\2\',\'\1\');@p" $rrd.xml >> munin.sql; |
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 | |
if [ -z $1 ] | |
then | |
echo "Usage: $0 sdx" | |
exit | |
elif [ `echo $1 | grep -c '/dev/'` -eq 0 ] |
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 | |
$source_file = "test_image.jpg"; | |
// histogram options | |
$maxheight = 300; | |
$barwidth = 2; | |
$im = ImageCreateFromJpeg($source_file); |
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 `find /usr/lib/jvm/last-jdk/bin/`; | |
do | |
b=`basename $i`; | |
update-alternatives --remove $b $i; | |
update-alternatives --install /usr/bin/$b $b $i 90000; | |
update-alternatives --set java $i; | |
done | |
unlink /opt/google/chrome/plugins/libnpjp2.so | |
unlink /usr/lib/mozilla/plugins/libnpjp2.so |
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 | |
export URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-GB/"; | |
mkdir -p /opt/mozilla/; | |
curl -L `curl -L $URL | sed -n 's@.*\(firefox-.*tar.bz2\)<.*@'$URL'/\1@p'` | sudo tar -jx -C /opt/mozilla/; |
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 | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
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
import hashlib | |
for i in hashlib.algorithms_available: | |
t = "sophie1"; | |
h = hashlib.new(i); | |
h.update(t); | |
th = h.hexdigest(); | |
print(t+" > "+i+" > "+h.hexdigest()); |
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 | |
# Get current disk usage | |
df -h | |
# Get the top 5 disk consuming folders | |
du -hxS / 2> /dev/null | sort -rh | head -n5 |
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
<script src="https://unpkg.com/vue"></script> | |
<main id="app" class="site"> | |
<header class="menu">Twister</header> | |
<aside class="profile"> | |
Profile Information | |
</aside> | |
OlderNewer