Skip to content

Instantly share code, notes, and snippets.

View happz's full-sized avatar

Miloš Prchlík happz

  • Red Hat
  • Brno, Czech Republic
View GitHub Profile
<VirtualHost *:80>
ServerAdmin osadnici@happz.cz
ServerName osadnici-test3.happz.cz
DocumentRoot /home/happz/settlers/src/static
ErrorLog /var/log/apache2/settlers/logs/error.log
CustomLog /var/log/apache2/settlers/logs/access.log combined
ProxyPass /static !
$HTTP["host"] == "osadnici-test3.happz.cz" {
dir-listing.activate = "enable"
server.document-root = "/home/happz/settlers/"
accesslog.use-syslog = "disable"
static-file.exclude-extensions = ()
$HTTP["url"] =~ "^/static/common.css$" {
server.document-root = "/home/happz/settlers/src/"
join_buffer_size = 8M
query_cache_size = 8M
thread_cache_size = 64
max_connections = 128
table_cache = 256
innodb_file_per_table
innodb_buffer_pool_size = 512M
innodb_additional_mem_pool_size = 512k
innodb_log_file_size = 15M
innodb_log_buffer_size = 1M
$SERVER["socket"] == "84.242.83.18:443" {
ssl.engine = "enable"
# ssl.pemfile = "/etc/lighttpd/ssl/lighttpd.pem"
ssl.pemfile = "/etc/lighttpd/ssl/key-cert.pem"
$HTTP["host"] =~ "^(mail|m).energyspots.co.nz$" {
accesslog.use-syslog = "disable"
accesslog.filename = "/var/log/lighttpd/mail.energyspots.co.nz-access.log"
url.redirect = (
/* set default status-line text
* tak_se_ukaz_Kolbene is allocated string or NULL
*/
void js_upcall_set_default_status(void *context, unsigned char *tak_se_ukaz_Kolbene)
{
struct f_data_c *fd=(struct f_data_c*)context;
unsigned char *trouba;
if (!fd)internal("Tak tohle teda ne, bobanku!\n");
xhappz@catherine:~# nmap -sA -n 82.150.190.9
Starting Nmap 5.00 ( http://nmap.org ) at 2012-05-24 22:03 CEST
All 1000 scanned ports on 82.150.190.9 are filtered
Nmap done: 1 IP address (1 host up) scanned in 23.23 seconds
xhappz@catherine:~# nmap -sA -n -p 3389 82.150.190.9
Starting Nmap 5.00 ( http://nmap.org ) at 2012-05-24 22:04 CEST
Interesting ports on 82.150.190.9:
ifconfig -a
ifconfig -a
ip r
ip a
ip a
ip a
ip a
ip a
ip a
ip a
@happz
happz / gist:7888757
Created December 10, 2013 10:45
JobIsRunning - Matcher[] support
public class JobIsRunning implements WaitCondition {
private Logger log = Logger.getLogger(JobIsRunning.class);
private Matcher[] includeJobs;
private Matcher[] excludeJobs;
public JobIsRunning() {
this(null, null);
}
/*
Expect source file, one record per line:
name;category;description;size;price;picture link;picture title
Note: record entries can not contain semicolons... Maybe better separator?
Also replace getNextRecord with different implementation based on your data source, this one does use file.
*/
function cmp($a, $b) {
return intval($a["age"]) - intval($b["age"]);
}
usort($pole, "cmp");