Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
concurrent=5
max=81
while [ $concurrent -lt $max ]
do
ab_args='-n 2000 -c '$concurrent
folder='run-'`date +'%Y%m%d%H%M%S'`'-'$concurrent
<?php
define('T', ' ');
define('N', PHP_EOL);
$functions = array();
$classes = array();
$constant_prefix = 'X_';
$php = '<?php' . N;
@agustincl
agustincl / pdt-stub.php
Created April 8, 2015 11:39
pdt-stub.php
<?php
/**
* This script can be used for generating PHP model for PDT.
* It builds PHP functions according to the loaded extensions in running PHP,
* using complementary information gathered from PHP.net documentation
*
* @author Michael Spector <michael@zend.com>
*/
if (version_compare(phpversion(), "5.0.0") < 0) {
<?php
/**
*
* config/autoload/entitiesGenerator.local.php
array(
'entitiesGenerator' => array(
'connection' => array(
'cnx' => array(
'driver' => 'pdo_mysql',
'host' => 'localhost',
@agustincl
agustincl / gist:6a5f5901a16159fe8483c2ef454dd457
Created April 20, 2016 17:54 — forked from stealth35/gist:1476550
Zend Server get_defined_functions
Array
(
[internal] => Array
(
[0] => zend_version
[1] => func_num_args
[2] => func_get_arg
[3] => func_get_args
[4] => strlen
[5] => strcmp
@agustincl
agustincl / postgres-cheatsheet.md
Created January 29, 2017 21:44 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

@agustincl
agustincl / angularjs-providers-explained.md
Created February 9, 2017 19:01 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@agustincl
agustincl / index.html
Created February 26, 2017 10:30 — forked from dustin/index.html
Couchbase Cluster RAM Usage
<!DOCTYPE html>
<style>
#chart {
width: 960px;
height: 500px;
}
#chart rect.bar {
stroke: black;
fill: #777;
@agustincl
agustincl / .block
Created February 26, 2017 16:20 — forked from NPashaP/.block
DashBoard
license: gpl-3.0
#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method