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 node | |
var LifxClient = require('node-lifx').Client; | |
var series = require('async').series; | |
var range = require('range').range; | |
function calculateColor(i) { | |
var h = Math.min((40 * i) + 20, 40); | |
var s = (1.0 - Math.max((i - 0.5) * 2, 0)) * 100; | |
var b = i * 100; |
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 | |
// 46.961s | |
// 684.50Mb | |
require_once __DIR__.'/vendor/autoload.php'; | |
require_once __DIR__.'/Ubench.php'; | |
ini_set('memory_limit', '-1'); | |
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 | |
use \PhpBinaryReader\BinaryReader; | |
require_once __DIR__.'/vendor/autoload.php'; | |
include_once('/Users/johnson/Sites/xhgui/external/header.php'); | |
$bytes = openssl_random_pseudo_bytes(100000); | |
$br = new BinaryReader($bytes); | |
while (!$br->isEof()) { |
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_once __DIR__.'/vendor/autoload.php'; | |
$file = 'test.mp3'; | |
// Load class into memory | |
class_exists('\PhpBinaryReader\BinaryReader'); | |
echo "Test file size: ".filesize($file)."\n\n"; |
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/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php | |
index 9a6ffeb..260acca 100755 | |
--- a/src/Illuminate/Database/Schema/Blueprint.php | |
+++ b/src/Illuminate/Database/Schema/Blueprint.php | |
@@ -60,9 +60,28 @@ class Blueprint { | |
{ | |
foreach ($this->toSql($connection, $grammar) as $statement) | |
{ | |
$connection->statement($statement); | |
} |
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/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php | |
index 836d013..888599b 100755 | |
--- a/src/Illuminate/Database/Schema/Blueprint.php | |
+++ b/src/Illuminate/Database/Schema/Blueprint.php | |
@@ -105,7 +105,7 @@ class Blueprint { | |
{ | |
if (count($this->columns) > 0 && ! $this->creating()) | |
{ | |
- array_unshift($this->commands, $this->createCommand('add')); | |
+ array_push($this->commands, $this->createCommand('add')); |
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/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php | |
index 836d013..035dc71 100755 | |
--- a/src/Illuminate/Database/Schema/Blueprint.php | |
+++ b/src/Illuminate/Database/Schema/Blueprint.php | |
@@ -58,10 +58,22 @@ class Blueprint { | |
*/ | |
public function build(Connection $connection, Grammar $grammar) | |
{ | |
- foreach ($this->toSql($connection, $grammar) as $statement) | |
- { |
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": { | |
"nikic/php-parser": "1.0.0-beta1" | |
} | |
} |
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 = new ReflectionClass('MY_CLASS'); | |
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC); | |
foreach ($methods as $method) { | |
$signature = implode(' ', Reflection::getModifierNames($method->getModifiers())); | |
$signature.= ' function'; | |
$signature.= ' '.$method->getName().' ('; |
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 | |
abstract class Zend_Date | |
{ | |
public function __construct ($date = null, $part = null, $locale = null); | |
public static function setOptions (array $options = array ()); | |
public function getTimestamp (); | |
public function setTimestamp ($timestamp); | |
public function addTimestamp ($timestamp); | |
public function subTimestamp ($timestamp); |
NewerOlder