Skip to content

Instantly share code, notes, and snippets.

View liverbool's full-sized avatar

Ishmael Dos liverbool

  • Earth
View GitHub Profile
## ------ 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
@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.

#! /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 / 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.

@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 / intb-dev-env.sh
Last active November 16, 2015 03:50
intb-dev-env
#!/bin/bash
locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
echo 'Asia/Bangkok' | sudo tee /etc/timezone
apt-get update
apt-get install -y python-software-properties curl zsh git nodejs npm ruby-dev gem && \
var fs = require("fs");
var dir = __dirname+"/functions";
/**
* Build packages by you want.
* Added by ツ Liverbool
*
* List of packages
* @see https://github.com/kvz/phpjs/tree/master/functions
@liverbool
liverbool / doctrine.function.convert.using.php
Last active December 21, 2015 18:09
MySql Convert Charset: CONVERT(... USING ...) for Doctrine 2
<?php
namespace Entities\meta\Functions;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
/**
* "CONVERT" "(" ArithmeticPrimary AliasResultVariable AliasResultVariable ")".
* More info:
* http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html#function_convert
@liverbool
liverbool / .bash_profile
Created March 12, 2016 14:05
Install NGINX, PHP-FPM (5.5.6), Mongo and MySql
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
@liverbool
liverbool / php70-apcu.sh
Last active March 21, 2016 11:16 — forked from TomK/php70-apcu.sh
PHP7 APCU
#!/bin/bash
# make sure you switch to php70
brew unlink php56 && brew link php70
# checkout and build
git clone git@github.com:krakjoe/apcu
cd apcu
make clean