Skip to content

Instantly share code, notes, and snippets.

View jamespo's full-sized avatar
🏠
Working from home

J.P jamespo

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
"""syslogreceiver.py - receive remote syslog events and pass them into
systemd's journal"""
import re
import socketserver
from systemd import journal
HOST, PORT = "0.0.0.0", 514
@jbeluch
jbeluch / .screenrc
Created November 17, 2010 14:53
Basic .screenrc
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{..G}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a"
#!/bin/bash
res=$(zenity --list --text="Choose a screen size" --column="Choice" --column="Resolution" --radiolist FALSE "1680x1050" TRUE "3360x1050" --separator=":")
if [ $? ] ; then
xrandr --size $res
fi
@bfg
bfg / apache-2.2-mod_remoteip.c
Created June 23, 2011 09:32
Working backport (doesn't crash when using Allow/Deny ACLs) of Apache 2.3 module mod_remoteip to Apache 2.2.x
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@abhiyerra
abhiyerra / .muttrc
Created January 2, 2011 05:05
Mutt for Gmail
# Change the following six lines to match your Gmail account details
set imap_user = "ykabhinav@gmail.com"
# set imap_pass = "PASSWORD"
set smtp_url = "smtp://ykabhinav@gmail.com@smtp.gmail.com:587/"
# set smtp_pass = "PASSWORD"
set realname = "Abhi Yerra"
set from = "ykabhinav@gmail.com"
@krimdomu
krimdomu / gist:9394089
Created March 6, 2014 16:50
task params
task "mytask", sub {
my $param = shift;
say $param->{param1};
say $param->{param2};
};
# call with: