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
After push: | |
2011-10-20T20:00:03+00:00 heroku[api]: Deploy cf9e66c | |
2011-10-20T20:00:03+00:00 heroku[api]: Release v50 created by pateketrueke@gmail.com | |
2011-10-20T20:00:06+00:00 heroku[slugc]: Slug compilation finished | |
2011-10-20T20:00:44+00:00 heroku[web.1]: Starting process with command `sh boot.sh` | |
2011-10-20T20:00:44+00:00 app[web.1]: Launching apache | |
2011-10-20T20:00:45+00:00 heroku[web.1]: State changed from starting to up | |
2011-10-20T20:00:45+00:00 app[web.1]: PHP Warning: PHP Startup: Unable to load dynamic library '/app/www/lib/soap.so' - /app/www/lib/soap.so: cannot open shared object file: No such file or directory in Unknown on line 0 | |
2011-10-20T20:00:45+00:00 app[web.1]: [Thu Oct 20 20:00:44 2011] [notice] Apache/2.2.19 (Unix) PHP/5.3.6 configured -- resuming normal operations |
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 | |
class Klass { | |
private $props = array(); | |
public function __construct(array $params = array()) { | |
$this->props = $params; | |
} | |
public function __call($method, $arguments) { | |
if ($item = $this->$method) { | |
if ($item instanceof Closure) { |
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 | |
call_user_func(function () { | |
register_shutdown_function(function () { | |
$data = xhprof_disable(); | |
$obj = new XHProfRuns_Default(); | |
$obj->save_run($data, 'MyApp'); | |
}); |
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
rand_port(){ | |
port=$(( 1234+( $(od -An -N2 -i /dev/random) )%(1023+1) )) | |
while : | |
do | |
(echo >/dev/tcp/localhost/$port) &>/dev/null && port=$(( 1234+( $(od -An -N2 -i /dev/random) )%(1023+1) )) || break | |
done | |
echo "$port" | |
} | |
phpmin(){ |
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 | |
require 'tetlphp/framework/initialize.php'; | |
import('db'); | |
import('www'); | |
import('a_record'); | |
run(function () { |
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
{ | |
"repositories": { | |
"pateketrueke": { | |
"package": { | |
"name": "tetlphp", | |
"version": "trunk", | |
"dist": { | |
"url": "https://github.com/pateketrueke/tetlphp/zipball/master", | |
"type": "zip" | |
} |
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 | |
require 'vendor/tetlphp/framework/initialize.php'; | |
import('www'); | |
run(function () { | |
root(function () { | |
echo 'Hello ', link_to('World', url_for::some_action()); |
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
vh(){ | |
paths[0]="/etc/apache2/sites-available" | |
paths[1]="/etc/apache2/extra/httpd-vhosts.conf" | |
paths[2]="/private/etc/apache2/virtualhosts" | |
paths[3]="/private/etc/apache2/extra/httpd-vhosts.conf" | |
for i in 0 1 2 3 | |
do | |
if [ -f "${paths[$i]}" ] || [ -d "${paths[$i]}" ]; then | |
conf="${paths[$i]}" |
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
ek@lamat:~/.local/lib/git/autoupload$ ruby listen.rb | |
/home/ek/.local/lib/git/autoupload/uploads/screenshot4.png | |
http://i.imgur.com/miGkN.png | |
/home/ek/.local/lib/git/autoupload/uploads/.listen_test | |
/home/ek/.local/lib/git/autoupload/imgur.rb:21:in `upload': undefined method `[]' for nil:NilClass (NoMethodError) | |
from /home/ek/.local/lib/git/autoupload/imgur.rb:27:in `upload_file' | |
from listen.rb:19:in `block in <main>' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/listen-0.4.5/lib/listen/listener.rb:190:in `call' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/listen-0.4.5/lib/listen/listener.rb:190:in `on_change' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/listen-0.4.5/lib/listen/listener.rb:199:in `block in initialize_adapter' |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. |
OlderNewer