The code and README has been moved: https://github.com/voscausa/appengine-gcs-blobstore-python
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 -e | |
# UDF Documentation: http://www.mysqludf.org/lib_mysqludf_preg/ | |
yum -y install pcre-devel gcc make automake mysql-devel | |
wget http://www.mysqludf.org/lib_mysqludf_preg/lib_mysqludf_preg-1.0.1.tar.gz | |
tar -zxvf lib_mysqludf_preg-1.0.1.tar.gz | |
cd lib_mysqludf_preg-1.0.1 | |
./configure | |
make install | |
echo "You'll need to enter your MySQL password a few times to install the UDFs and test them" |
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 | |
## PHP 7 Initial Compile ## | |
## Some help from the various places like these. ## | |
# http://www.zimuel.it/install-php-7/ | |
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu | |
## Setup Ubuntu 15.04 ## | |
# I like the speed of Apt-Fast. Will check for installs some other day. | |
sudo apt-get install apt-fast |
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 | |
# PARAMETERS | |
# ---------- | |
# PHP | |
# --- | |
PHP_TIMEZONE="UTC" | |
PHP_DIRECTORY="/etc/php5ts" | |
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 | |
$chromeExec = 'google-chrome'; | |
$inputFile = __DIR__.'/input.html'; | |
$outputFile = __DIR__.'/output.pdf'; | |
$version = shell_exec($chromeExec . ' --version 2>&1'); | |
if(!strpos($version, 'Google Chrome') === 0) { | |
throw new Exception('Google Chrome not found at: '.$chromeExec); |
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
Object.prototype.join = function(glue, separator) { | |
var object = this; | |
if (glue == undefined) | |
glue = '='; | |
if (separator == undefined) | |
separator = ','; | |
return Object.keys(object).map(function (key, value) { return [key, value].join(glue); }).join(separator); |
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
/** | |
* Fix for broken html tags inside strings for php. | |
* | |
* By using passing the html through DOMDocument and converting the html | |
* entities we are left with beautiful well formatted code. Huzzah! | |
* | |
* "Nothing is ever easy" -Zedd, Wizards First Rule | |
* | |
* @var DOMDocument | |
*/ |
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 | |
/* | |
参考自: | |
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function | |
http://snipplr.com/view/68099/ | |
*/ | |
function HTTPStatus($num) { | |
$http = array( |
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
<html> | |
<body> | |
<p>Here are Webber’s points:</p> | |
<ul> | |
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li> | |
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li> | |
<li>Use echo’s multiple parameters instead of string concatenation.</li> | |
<li>Set the maxvalue for your for-loops before and not in the loop.</li> | |
<li>Unset your variables to free memory, especially large arrays.</li> | |
<li>Avoid magic like __get, __set, __autoload</li> |
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
/* | |
* A simple libpng example program | |
* http://zarb.org/~gc/html/libpng.html | |
* | |
* Modified by Yoshimasa Niwa to make it much simpler | |
* and support all defined color_type. | |
* | |
* To build, use the next instruction on OS X. | |
* $ brew install libpng | |
* $ clang -lz -lpng16 libpng_test.c |
OlderNewer