Skip to content

Instantly share code, notes, and snippets.

Index: sapi/cli/config.w32
===================================================================
--- sapi/cli/config.w32 (revision 308839)
+++ sapi/cli/config.w32 (working copy)
@@ -6,7 +6,8 @@
ARG_ENABLE('cli-win32', 'Build console-less CLI version of PHP', 'no');
if (PHP_CLI == "yes") {
- SAPI('cli', 'php_cli.c', 'php.exe');
+ SAPI('cli', 'php_cli.c php_http_parser.c php_cli_server.c', 'php.exe');
@JamesMessinger
JamesMessinger / circular-refs.js
Created July 16, 2015 03:31
JSON Schema Circular $Refs
{
"definitions": {
"thing": {
"$ref": "#/definitions/thing" // circular reference to self
},
"person": {
"properties": {
"name": {
"type": "string"
},
<?php
class ConfigController {
const MODEL = 'App\Models\Config';
// see RestControllerTrait. sends less data on indexing the list of the model
// protected $indexFields = [ 'name' ];
protected $triggers = [
// 'show' => 'extendObject',
// 'update' => 'dataFormatFix',
@igorw
igorw / composer.json
Created October 6, 2012 13:41
React Chatroulette
{
"require": {
"react/socket": "0.2.*"
}
}
@mbostock
mbostock / .block
Last active May 25, 2017 05:19 — forked from mbostock/.block
Geodesic Grid
license: gpl-3.0
@beberlei
beberlei / TxController.php
Created August 6, 2012 09:44
Transactional Service Proxy
<?php
class TxController extends Controller
{
public function context($id)
{
return new TxProxy($this->get($id), $this->get('doctrine.orm.default_entity_manager'));
}
}
@mnapoli
mnapoli / DI containers summary.md
Last active May 7, 2018 07:58
DI containers usage comparison
@mxriverlynn
mxriverlynn / findkey.js
Created November 20, 2012 03:48
Find key by value, with underscore.js
function findKey(obj, value){
var key;
_.each(_.keys(obj), function(k){
var v = obj[k];
if (v === value){
key = k;
}
});
PDO::FETCH_FUNC without validation
10: 0.001568078994751
0.00071001052856445
0.00085306167602539
0.00087618827819824
0.00083112716674805
100: 0.0012631416320801
0.0014598369598389
@gdiggs
gdiggs / tempserver.go
Created April 16, 2014 02:18
One Line Go server to serve static assets from current folder
echo "package main; import \"net/http\"; import \"os\"; import \"os/exec\"; import \"os/signal\"; func main() { go func() { sigchan := make(chan os.Signal, 2); signal.Notify(sigchan, os.Interrupt); <-sigchan; cmd := exec.Command(\"rm\", \"tempserver.go\"); cmd.Run(); os.Exit(0) }(); panic(http.ListenAndServe(\":8000\", http.FileServer(http.Dir(\".\")))) }" > tempserver.go && go run tempserver.go