This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Delete file | |
* | |
* @param id[required] $id | |
* @param reason[required] $reason | |
* @return Response stdClass if succes, or FALSE if there error. | |
*/ | |
public function delete($id=null, $reason="") { | |
if(($id==null) or (empty($id))) | |
throw new Exception("MISSING_PARAMETER: No id given."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import selenium | |
import unittest, time, re | |
class Untitled(unittest.TestCase): | |
def setUp(self): | |
self.verificationErrors = [] | |
self.selenium = selenium("localhost", 4444, "*chrome", "http://blip.tv/") | |
self.selenium.start() | |
def test_untitled(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elpowerd_status="`initctl status powerd`" | |
if [ ! "$powerd_status" = "powerd stop/waiting" ] | |
then | |
echo "Stopping powerd to keep display from timing out..." | |
initctl stop powerd | |
fi | |
# Do partitioning (if we haven't already) | |
ckern_size="`cgpt show -i 6 -n -s -q /dev/sda`" | |
croot_size="`cgpt show -i 7 -n -s -q /dev/sda`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pycurl | |
def body(buf): | |
print len(buff) | |
your_url = "http://pygotham.org/talkvote/full_schedule" | |
pycurl_connect = pycurl.Curl() | |
pycurl_connect.setopt(pycurl.URL, your_url) | |
pycurl_connect.setopt(pycurl.WRITEFUNCTION, body) | |
pycurl_connect.setopt(pycurl.HTTPHEADER, ['Content-Type:application/json', 'Accept:application/json']) | |
pycurl_connect.perform() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define bpl | |
info breakpoints | |
end | |
document bpl | |
List breakpoints | |
end | |
define bp | |
set $SHOW_CONTEXT = 1 | |
break * $arg0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set | |
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j LOG --log-prefix "SSH_brute_force " | |
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo find /etc -name "*vboxadd*" -exec rm {} \; | |
sudo find /etc -name "*vboxvfs*" -exec rm {} \; | |
sudo rm -r /usr/src/vboxadd-* | |
sudo rm -r /usr/src/vboxvfs-* | |
sudo rm /usr/sbin/vboxadd-timesync | |
sudo rm /lib/modules/`uname -r`/misc/vboxadd.ko | |
sudo rm /lib/modules/`uname -r`/misc/vboxvfs.ko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-1.6.29.3-beta.zip | |
unzip release-1.6.29.3-beta.zip | |
cd ngx_pagespeed-release-1.6.29.3-beta/ | |
wget https://dl.google.com/dl/page-speed/psol/1.6.29.3.tar.gz | |
tar -xzvf 1.6.29.3.tar.gz # expands to psol/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
# check http://nginx.org/en/download.html for the latest version | |
wget http://nginx.org/download/nginx-1.4.1.tar.gz | |
tar -xvzf nginx-1.4.1.tar.gz | |
cd nginx-1.4.1/ | |
./configure --add-module=$HOME/ngx_pagespeed-release-1.6.29.3-beta | |
make | |
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My instructions were written against the Git master branches of all the projects involved, as of a few | |
months ago. They're currently a bit out of date, as I've been caught up with some other work and didn't | |
get a chance to maintain them. For starters, compiling a patched KVM source against the latest currently shipping F18 kernel (3.9.*) doesn't work as well as it used to against the shipping F18 kernel from a few months ago (3.6.*). I meant to dig through the kvm-kmod scripts and try to fix that, and send Jan Kiszka (the owner of kvm-kmod) a patch, but it's sadly still on my to-do list. | |
Building the rest of it (qemu and seabios) should be a bit simpler, but since I had no patched kernel | |
module to test it with, I slacked off, and I wouldn't be surprised if the patches no longer apply to the | |
current Git master branch of qemu and seabios, respectively. | |
I don't have (never did have) a nicely packaged and releasable "image" -- just patches that happened | |
to work against the respective current development branche |
OlderNewer