Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
main() {
REMOTES="$@";
if [ -z "$REMOTES" ]; then
REMOTES=$(git remote);
fi
REMOTES=$(echo "$REMOTES" | xargs -n1 echo)
CLB=$(git branch -l|awk '/^\*/{print $2}');
echo "$REMOTES" | while read REMOTE; do
<?php
function logMsg($str) {
syslog(LOG_ERR, microtime()." | connection_status() = ".connection_status()." | ".$str."\n");
}
register_shutdown_function(function(){
logMsg("shutdown");
});
#!/usr/bin/env ruby
# The MIT License
#
# Copyright (c) 2011 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
[ 135.277110]
[ 135.277117] ***************************************************************
[ 135.277120] ***************************************************************
[ 135.277123] ** WARNING: Currently emulating unsupported memory accesses **
[ 135.277125] ** in /lib/tls glibc libraries. The emulation is **
[ 135.277128] ** slow. To ensure full performance you should **
[ 135.277130] ** install a 'xen-friendly' (nosegneg) version of **
[ 135.277133] ** the library, or disable tls support by executing **
[ 135.277135] ** the following as root: **
[ 135.277138] ** mv /lib/tls /lib/tls.disabled **
sudo apt-get update &&
sudo apt-get install -y mdadm xfsprogs
volumes=4
raiddevice=/dev/md1
mountpoint=/mnt/db-raid0-xfs
devices=$(perl -e 'for$i("h"){for$j("",1..15){print"/dev/sd$i$j\n"}}'| head -$volumes)
devicearray=($devices)
echo $devices
sudo mdadm --create --verbose $raiddevice \
diff --git a/php.ini b/php.ini
index 4572cf5..ed076ab 100644
--- a/php.ini
+++ b/php.ini
@@ -455,7 +455,7 @@ max_input_time = 60
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
-memory_limit = 128M
+memory_limit = 512M
diff --git a/aws-sdk-1.5.4/services/dynamodb.class.php b/aws-sdk-1.5.4/services/dynamodb.class.php
index cf43ec2..a408e9f 100644
--- a/aws-sdk-1.5.4/services/dynamodb.class.php
+++ b/aws-sdk-1.5.4/services/dynamodb.class.php
@@ -240,7 +240,14 @@ class AmazonDynamoDB extends CFRuntime
throw new DynamoDB_Exception('The DynamoDB class requires the "default_cache_config" configuration to be set in the config.inc.php file.');
// @codeCoverageIgnoreEnd
}
-
+
Ign http://us-east-1.ec2.archive.ubuntu.com lucid/main Packages
Ign http://us-east-1.ec2.archive.ubuntu.com lucid/universe Packages
Ign http://us-east-1.ec2.archive.ubuntu.com lucid/main Sources
Ign http://us-east-1.ec2.archive.ubuntu.com lucid/universe Sources
Ign http://us-east-1.ec2.archive.ubuntu.com lucid-updates/main Packages
Ign http://us-east-1.ec2.archive.ubuntu.com lucid-updates/universe Packages
Ign http://us-east-1.ec2.archive.ubuntu.com lucid-updates/main Sources
Hit http://ppa.launchpad.net karmic Release.gpg
Ign http://us-east-1.ec2.archive.ubuntu.com lucid-updates/universe Sources
Err http://us-east-1.ec2.archive.ubuntu.com lucid/main Packages
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: sudo $0 /dev/sdh1"
exit 1;
fi
dd if=$1 of=/dev/null & pid=$!
while true; do
ps -p$pid --no-heading || break;
echo "-- $(date) ------------------";
@muhqu
muhqu / gist:4003563
Created November 2, 2012 18:52
mustache-like template engine
<?php
class Template {
function __construct($code, $escape = null) {
$this->code = $code;
$this->preparsed = null;
$this->escape = $escape;
}