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;
<?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
@agustincl
agustincl / GeoIPCountryWhois.csv
Last active March 31, 2017 10:57 — forked from Luavis/GeoIPCountryWhois.csv
GeoIpCountryWhois with header
We can't make this file beautiful and searchable because it's too large.
StartIP,EndIP,StartIPInt,EndIpInt,CountryCode,Country
"1.0.0.0","1.0.0.255","16777216","16777471","AU","Australia"
"1.0.1.0","1.0.3.255","16777472","16778239","CN","China"
"1.0.4.0","1.0.7.255","16778240","16779263","AU","Australia"
"1.0.8.0","1.0.15.255","16779264","16781311","CN","China"
"1.0.16.0","1.0.31.255","16781312","16785407","JP","Japan"
"1.0.32.0","1.0.63.255","16785408","16793599","CN","China"
"1.0.64.0","1.0.127.255","16793600","16809983","JP","Japan"
"1.0.128.0","1.0.255.255","16809984","16842751","TH","Thailand"
"1.1.0.0","1.1.0.255","16842752","16843007","CN","China"