Skip to content

Instantly share code, notes, and snippets.

View liverbool's full-sized avatar

Ishmael Dos liverbool

  • Earth
View GitHub Profile
@liverbool
liverbool / basic-mac-dev-setup.sh
Last active August 29, 2015 14:24
Basic Mac Developer Setup
# Basic Mac Developer Setup
# =========================
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" &&\
brew install wget &&\
brew install caskroom/cask/brew-cask &&\
brew cask install google-chrome &&\
brew cask install google-drive &&\
brew cask install git &&\
brew cask install github &&\
@liverbool
liverbool / README.md
Last active August 29, 2015 14:20 — forked from revett/README.md

Tutum Zero Downtime Re-deploy

cats.jpg

I tweeted Tutum last night asking if they're looking at implementing zero downtime re-deploys for a given service. Slightly surprised by their response as it seems like a critical feature if you want to use the service for a production environment.

"not a top priority, but by Spring :)"

As Tutum currently doesn't support graceful termination of containers within a service, I was experiencing a 5-10 second window of 503 errors, so decided to use the following hack (code below) until the feature is officially implemented.

#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@liverbool
liverbool / post.md
Last active August 29, 2015 14:15 — forked from ikwattro/post.md

Discover Graph Databases with Neo4j and PHP

Graph databases are now one of the core technologies of companies dealing with highly connected data.

Business graphs, social graphs, knowledge graphs, interest graphs and media graphs are frequently in the (technology) news. And for a reason. The graph model represents a very flexible way of handling relationships in your data. And graph databases provide fast and efficient storage, retrieval and querying for it.

Neo4j, the most popular graph database, has proven that ability to deal with massive amount of high connected data in many use-cases.

## ------ Check List ------- ##
# set server timezone
sudo dpkg-reconfigure tzdata
(to Asia/Bangkok)
# install php
apt-get update
apt-get install php5-cli
apt-get install php5-curl
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@liverbool
liverbool / BuildAttributeFormChoicesListener.php
Created October 9, 2014 18:01
fix sylius form attribute choice.
<?php
namespace BugFix\Sylius\CoreBundle\Form\Type;
use Sylius\Component\Attribute\Model\AttributeTypes;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormFactoryInterface;
class BuildAttributeFormChoicesListener implements EventSubscriberInterface
@liverbool
liverbool / 0_reuse_code.js
Created March 3, 2014 14:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@liverbool
liverbool / phpmyadmin
Created March 2, 2014 17:10
ubuntu 13 phpmyadmin up/down
#!/bin/bash
currentdir=`echo $PWD`
if [ "$1" = "up" ];then
cd /etc/apache2/conf-enabled/
ln -s -T /etc/apache2/conf-available/phpmyadmin.conf phpmyadmin.conf
service apache2 reload
else if [ "$1" = "down" ];then
rm /etc/apache2/conf-enabled/phpmyadmin.conf
<?php
/**
* See also {
@link http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
@link http://mirror.neu.edu.cn/mysql/tech-resources/articles/hierarchical-data.html
@link http://www.sitepoint.com/hierarchical-data-database-2/
* }
*/
class JTreeTable extends JObject
{