Skip to content

Instantly share code, notes, and snippets.

View liverbool's full-sized avatar

Ishmael Dos liverbool

  • Earth
View GitHub Profile
@liverbool
liverbool / gist:4b62ffe3194110a475c8
Last active August 27, 2015 20:39 — forked from ebuildy/gist:5d4ad0998848eaefdad8
Setup sentry logger on a fresh Ubuntu server
sudo apt-get update
sudo apt-get install python-virtualenv
sudo apt-get install python-dev
sudo apt-get install postgresql
sudo apt-get install postgresql-server-dev-9.3
sudo apt-get install redis-server
sudo -u postgres createuser -s sentry
sudo -u postgres psql -c "alter user sentry with password 'sentry';"
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
http://askubuntu.com/questions/14763/where-are-the-apache-and-php-log-files
Check this settings in PHP.INI:
error_reporting = E_ALL | E_STRICT (as recommended for development in php.ini)
error_log = /var/log/php_errors.log
Then create log file manually
touch /var/log/php_errors.log
@liverbool
liverbool / JP-Acl.php
Created February 20, 2014 12:42
Sample Acl
<?php
namespace JP\Authen;
/**
* we are start with deny concept
* all usergroup init with deny (not allow)
*
* mulitple usergroup
* allow + allow = allow
* deny + deny = deny
<?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
{
@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
@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 / 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
# ---------------------------------------------------------------------------
#
# 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