Skip to content

Instantly share code, notes, and snippets.

View bi0nd0's full-sized avatar

Francesco Delacqua bi0nd0

  • Vanderbilt University Medical Center
  • Nashville
View GitHub Profile
@bi0nd0
bi0nd0 / gist:a267512c0649ccc5ba74884576985f17
Created June 29, 2019 06:53 — forked from mvriel/gist:3822861
Option arrays in PHPDoc
<?php
/*
This code sample demonstrates several style for representing an option array with
the following fields: name, label, type_id, visible, default.
When designing this we should keep in mind that the option key may be represented
by either a literal or a (class)constant. As such we mix and match those for
illustrative purposes.
*/
@bi0nd0
bi0nd0 / Worker.php
Created December 15, 2018 22:34 — forked from etheriqa/Worker.php
Parallel processing on PHP using stream_select()
<?php
interface Worker
{
public function getCommand();
public function done($stdout, $stderr);
public function fail($stdout, $stderr, $status);
}
@bi0nd0
bi0nd0 / instructions.md
Last active September 25, 2018 21:00 — forked from sveggiani/instructions.md
[Configure XDebug, Visual Studio Code for a Vagrant VM] #debug #vm #vscode

Enabling php7 XDebug for VS Code on Ubuntu 16.04

Install php-xdebug.

sudo apt-get install php-xdebug

Run below command in terminal to ensure xdebug is installed properly. You’ll find xdebug in the list.

php -m

@bi0nd0
bi0nd0 / mysqldump.bat
Created January 2, 2014 15:22
Batch command to dump all databases in a file with datetime stamp
@echo off
echo Running dump...
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump" -uusername -ppassword --events --all-databases --result-file="E:\backup\database\sql_%DATE:~-4,4%-%DATE:~-7,2%-%DATE:~-10,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.sql"
echo Done!
exit
@bi0nd0
bi0nd0 / gist:7427668
Created November 12, 2013 08:50
Join Multiple Files Together with Cat
cat sample1.txt sample2.txt sample3.txt > sample-all.txt