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
var http = require('http') | |
http.createServer(function(request, response){ | |
var request_options = { | |
host: request.headers['host'], | |
port: 80, | |
path: request.url, | |
method: request.method | |
} | |
var proxy_request = http.request(request_options, function(proxy_response){ |
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
/* | |
** Pascal Sebah : September 1999 | |
** | |
** Subject: | |
** | |
** A very easy program to compute Pi with many digits. | |
** No optimisations, no tricks, just a basic program to learn how | |
** to compute in multiprecision. | |
** | |
** Formulae: |
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
#!/usr/bin/env bash | |
nova list | grep $1 | awk '{system("nova delete " $2)}' |
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
#!/usr/bin/env bash | |
nova list | grep $1 | awk '{system("nova show " $2)}' | grep ':host' |
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
#!/usr/bin/env python | |
import sys, os, time, atexit | |
from signal import SIGTERM | |
from subprocess import call | |
class Daemon: | |
""" | |
A generic daemon class. |
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
# Original source: | |
# http://howto.pui.ch/post/37471155682/ | |
# set-timeout-for-a-shell-command-in-python | |
import datetime | |
import os | |
import time | |
import signal | |
import subprocess |
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
diff --git a/nailgun/nailgun/fixtures/sample_environment.json b/nailgun/nailgun/fixtures/sample_environment.json | |
index 7693356..0c32e20 100644 | |
--- a/nailgun/nailgun/fixtures/sample_environment.json | |
+++ b/nailgun/nailgun/fixtures/sample_environment.json | |
@@ -780,7 +780,7 @@ | |
{ | |
"model": "VBOX HARDDISK", | |
"name": "sda", | |
- "disk": "sda", | |
+ "disk": "disk/by-path/pci-0000:00:06.0-scsi-0:0:0:0", |
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
#!/usr/bin/env bash | |
drop_db=0 | |
case "$1" in | |
-d|--drop-db) drop_db=1;; | |
esac | |
if [ $drop_db -eq 1 ]; then | |
sudo -u postgres dropdb nailgun |
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 time | |
from selenium import webdriver | |
def open_blog(): | |
driver = webdriver.Firefox() | |
driver.get('http://blog.e0ne.info/') | |
time.sleep(5) | |
driver.quit() |
OlderNewer