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
#!/bin/bash | |
# == Synopsis | |
# This is a SkyScript launched by Skystack, it was adapted from the StackScript used at Linode. | |
# | |
# == Website | |
# http://skystack.com | |
# == Author | |
# Tass Skoudros | |
# | |
# == Parameters |
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
#!/bin/bash | |
arch=$(uname -m) | |
if [ $arch = 'x86_64' ]; then | |
SOURCE=https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb | |
NAME=mod-pagespeed-beta_current_amd64.deb | |
else if [ $arch = 'i686' ]; then |
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
#!/bin/bash | |
#OLOH SOURCE=http://www.ohloh.net/p/lithium/download?filename=lithium-0.9.5.tar.gz | |
SOURCE=http://d10xg45o6p6dbl.cloudfront.net/projects/l/lithium/lithium-0.9.5.tar.gz | |
NAME=lithium-0.9.5 | |
DB_NAME=lithium_test | |
DB_USER=lithium_user | |
VPATH=/var/www/example.com | |
#DB_PWD=`cat /opt/skystack/bootstrapper/etc/.mysql.lithium_user.shadow` |
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
if [ $(uname -m) = 'x86_64' ]; then | |
export arch=x86_64 | |
else | |
export arch=i386 | |
fi |
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
require 'rubygems' | |
require 'fcntl' | |
require 'json' | |
block = "" | |
# Set $stdin to be non-blocking | |
$stdin.fcntl(Fcntl::F_SETFL,Fcntl::O_NONBLOCK) | |
begin | |
$stdin.each_line { |line| | |
block << line | |
} |
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
<?php | |
/** | |
* A CakePHP datasource for the mongoDB (http://www.mongodb.org/) document-oriented database. | |
* | |
* This datasource uses Pecl Mongo (http://php.net/mongo) | |
* and is thus dependent on PHP 5.0 and greater. | |
* | |
* Original implementation by ichikaway(Yasushi Ichikawa) http://github.com/ichikaway/ | |
* | |
* Reference: |
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
$str = '3021e69d9d2569db27ce7b74ccaa98496007de09a1f4b94e45f48203d8727ac6 test.com [05/Jul/2011:07:28:57 +0000] 126.97.98.19 3021e69d9d2569db27ce7b74ccaa98496007de09a1f4b94e45f48203d8727ac6 70706DF22A809F33 REST.GET.OBJECT 1as21/foldera/file.png "GET //folder/test.php?AWSAccessKeyId=45dsgrg$5f&Expires=1310388787&Signature=Yehn847BhdsaiuernYmjne= HTTP/1.1" 206 - 47972352 209316737 54194091 7 "http://test.info/?url=http://ns.in/54325" "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" -'; | |
$regex = <<<REGEX | |
/"((?:[^"]*|)++)\" | |
|\[((?:[^\]]*|)++)\] | |
|[\s] | |
/x | |
REGEX; | |
$out = preg_split($regex,$str, 0, PREG_SPLIT_DELIM_CAPTURE ); |