Skip to content

Instantly share code, notes, and snippets.

View kaecyra's full-sized avatar

Tim Gunter kaecyra

View GitHub Profile
<?php
/**
* Hook early and perform wintery-type actions
*
* @param Gdn_Dispatcher $sender
* @return void
*/
public function Gdn_Dispatcher_AppStartup_Handler($sender) {
// Don't do anything if its not Winter Time
<?php
function stripper($str, $desired, $keep) {
$ref = strip_tags($str, $keep);
$reflen = strlen($ref);
$out = '';
$outlen = 0;
$inAnchor = false;
$inTag = false;
$inClose = false;
root@db7.cl1.vanilladev.com:~/token# ping int.data.cl1.vanilladev.com
PING int.data.cl1.vanilladev.com (10.176.36.144) 56(84) bytes of data.
From int.db7.cl1.vanilladev.com (10.180.158.122) icmp_seq=2 Destination Host Unreachable
From int.db7.cl1.vanilladev.com (10.180.158.122) icmp_seq=3 Destination Host Unreachable
From int.db7.cl1.vanilladev.com (10.180.158.122) icmp_seq=4 Destination Host Unreachable
root@db7.cl1.vanilladev.com:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
FIREWALL all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
FIREWALL all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
root@db7.cl1.vanilladev.com:~# netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 803 0 0 0 636 0 0 0 BMRU
eth1 1500 0 108365 0 0 0 98825 0 0 0 BMRU
lo 16436 0 0 0 0 0 0 0 0 0 LRU
root@db7.cl1.vanilladev.com:~# netstat -i | column -t
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 834 0 0 0 665 0 0 0 BMRU
eth1 1500 0 132199 0 0 0 120086 0 0 0 BMRU
lo 16436 0 0 0 0 0 0 0 0 0 LRU
@kaecyra
kaecyra / testphp.php
Last active November 17, 2015 21:15
Syntax check all PHP files in a folder
#!/bin/bash
me=`basename $0`
if [ $# -lt 1 ]; then
echo "Usage: $me [-q] <folder>"
exit 1;
fi
quick=false
if [ "$1" = "-q" ]; then
<?php
if ($state->have(['spit', 'hot', 'fire'], true)) {
$emotes = [
'(celeryman)',
'(banks)',
'(dance)',
'(gangnamstyle)',
'(danceman)',
'(boom)',
### Keybase proof
I hereby claim:
* I am kaecyra on github.
* I am timgunter (https://keybase.io/timgunter) on keybase.
* I have a public key whose fingerprint is C2B0 F483 10E6 BA22 E379 A611 DBB2 45F0 F584 AC5B
To claim this, I am signing this object:
icarus:~ icyliquid$ ab -n 100 -c 2 https://withwaf.vanillatesting.com/
Benchmarking withwaf.vanillatesting.com (be patient).....done
Server Software: nginx
Server Hostname: withwaf.vanillatesting.com
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,4096,256
Document Path: /