Skip to content

Instantly share code, notes, and snippets.

dizda / gist:a6b7bb4a2ff56fc40663cdc9e90553fa
Created July 6, 2020 07:26 — forked from carlos8f/gist:3473107
siege Mac OS X caveats
View gist:a6b7bb4a2ff56fc40663cdc9e90553fa
Mac OS X has only 16K ports available that won't be released until socket
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds.
Consider reducing in case of available port bottleneck.
You can check whether this is a problem with netstat:
# sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
# sudo sysctl -w net.inet.tcp.msl=100
dizda /
Created April 4, 2018 12:05
NANO install specific version's script
#!/usr/bin/env bash
set -o errexit
set -o xtrace
rm -rf rai_build_$VERSION/
echo "Installing $VERSION..."
git clone --recursive rai_build_$VERSION
cd rai_build_$VERSION
dizda / squid_mysql_redis_auth.php
Created April 21, 2016 14:38
Database auth helper for Squid in php using redis as a cache provider.
View squid_mysql_redis_auth.php
#!/usr/bin/env php
* Database auth helper for Squid in php using redis as a cache provider.
* Jonathan Dizdarevic @dizzda
//stream_set_blocking(STDIN, 0);
dizda / Gulpfile.js
Created April 20, 2015 09:49
View Gulpfile.js
'use strict';
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
minifycss = require('gulp-minify-css'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
del = require('del'),
useref = require('gulp-useref'),
gulpif = require('gulp-if'),
dizda /
Created April 14, 2015 23:03

Keybase proof

I hereby claim:

  • I am dizda on github.
  • I am dizda ( on keybase.
  • I have a public key whose fingerprint is 4EFA 466E EFD4 BECC E682 CB8F CB82 C516 AE43 A354

To claim this, I am signing this object:

dizda /
Last active July 18, 2022 06:41
Install bitcoind on debian wheezy
tar xvzf v0.9.3.tar.gz
mv bitcoin-0.9.3/ daemon/
apt-get install build-essential libtool autotools-dev autoconf libssl-dev libboost-all-dev pkg-config
# Get configure
# Enable hardening is more secure
dizda / mongo.js
Created May 4, 2013 23:24
MongoDB Add field to all documents without criteria
View mongo.js
db.TheCollection.update({}, {$set:{'parent':true}}, {multi:true});
// {} = empty selector
dizda / Growl.js
Last active December 14, 2015 05:49 — forked from Seasons7/app.js
Growl-like notifications in Titanium (tested under iOS)
View Growl.js
Growl = (function() {
// constructor
function Growl(message){
this.message = message;
} = function()
dizda / gist:2589229
Last active October 4, 2015 05:57
sample configuration file of nginx for symfony2 project
View gist:2589229
server {
listen [::]:80;# to listenning both on IPv4 & IPv6
location / {
root /opt/www/;
index app.php;
if ($request_filename !~ "\.(htc|ico|gif|jpg|jpeg|png|css|js)$") {
rewrite ^(.*) /app.php$1 last;
dizda / php.rb
Created March 2, 2012 17:01
brew install php 5.4
View php.rb
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
def postgres_installed?
`which pg_config`.length > 0