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 | |
# Profiles must be named profile1, profile2, etc.. | |
N=$(( ( RANDOM % 12 ) + 1 )); | |
terminator -p profile$N -T $N & |
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 | |
/* | |
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto | |
Version 1.1 | |
Last Modified: 2010-02-17 | |
This library is free software; you can redistribute it and/or modify it | |
under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation; either version 2.1 of the License, or (at | |
your option) any later version. |
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
server { | |
listen 80; | |
server_name [SERVERNAME]; | |
root [HTROOT-PATH]; | |
index index.php index.html index.htm; | |
location / { | |
# First attempt to serve request as file | |
try_files $uri $uri/index.php; | |
} |
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
lastpart=`fdisk -l /dev/sda | grep sda |tail -1 |awk '{ print $1 }' |grep -o "[0-9]"` | |
newpart=`expr $lastpart + 1` | |
startsec=`parted /dev/sda unit s print free |tail -2 |grep Free |awk '{ print $1 }'` | |
endsec=`parted /dev/sda unit s print free |tail -2 |grep Free |awk '{ print $2 }'` | |
parted /dev/sda mkpart primary ext2 $startsec $endsec | |
parted /dev/sda set $newpart lvm on | |
partx -v -a /dev/sda | |
pvcreate /dev/sda$newpart | |
vgname=`vgdisplay |grep "VG Name" |awk '{ print $3 }'` | |
vgextend $vgname /dev/sda$newpart |
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
watch -n .1 "echo 'QUERY_STATEMENT' | mysql -u DBUSER -pDBPASS DBNAME" |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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
// This small function is somewhere in my code, only purpose is to keep the snippet as small as possible | |
// Return the line number from a new Error().stack element. | |
function _dl(s){ | |
return "\n\t=>\t[" + s.toString() | |
.split(/\r\n|\n/)[1] // get the line | |
.split(/(.*)\((.*)\)(0*)/)[2] // filepath, line number | |
+ ']'; | |
} | |
// ..becose chrome console sometimes jerks with line numbers. |
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
[POOL] | |
listen = /var/run/php5.POOL.sock | |
listen.owner = www-data | |
listen.group = www-data | |
user = USER | |
group = USER | |
pm = dynamic | |
pm.max_children = 5 |
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
--[[ | |
conky vertical bar graph | |
by iggykoopa mods by arpinux(2009) | |
most of the credit goes to londonali1010, I stole big chunks from her ring graphs | |
]] | |
require 'cairo' |