Skip to content

Instantly share code, notes, and snippets.

View sobanvuex's full-sized avatar
💻
Equilibrium

Alex Soban sobanvuex

💻
Equilibrium
View GitHub Profile
@sobanvuex
sobanvuex / newrelic-mysql.conf
Created June 27, 2013 06:29
NewRelic MySQL Plugin Upstart Job
description "start and stop Newrelic MySQL Java Plugin"
version "1.0"
author "Alex Soban"
env PLUGIN_VER=1.0.2
env PLUGIN_DIR=/root/apps
env PLUGIN_NAME=newrelic_mysql_plugin
start on runlevel [2345]
stop on runlevel [016]
@sobanvuex
sobanvuex / nginx
Last active October 23, 2018 16:14
SysVinit script for Nginx
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Nginx
# Description: Nginx Web Server
### END INIT INFO
@sobanvuex
sobanvuex / Model.php
Last active December 27, 2015 17:18
Lithium Model extension to support master/slave write/read
<?php
namespace app\extensions\data;
use lithium\data\Connections;
/**
* Description of Model
*
* @author Alex Soban
@sobanvuex
sobanvuex / .bashrc
Last active December 28, 2015 10:39
wget https://gist.github.com/SobanVuex/7487909/raw -O ~/.bashrc 2>/dev/null && . ~/.bashrc && sh-reload
# Options
shopt -s nocaseglob
shopt -s histappend
shopt -s cdspell
# Colors
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
@sobanvuex
sobanvuex / notclickingbad.js
Last active December 28, 2015 11:09
'NOT' Clicking Bad
/**
* Clicking Bad - http://clickingbad.nullism.com/
*
* 'Not Clicking Bad' for the lazy and lulz
* Open your browser's console, copy and paste!
* walter.jesse() - make meth!
* walter.lydia() - sell meth!
* walter.hank() - hide from Hank (aka deactivate)
*/
@sobanvuex
sobanvuex / logger.php
Last active December 30, 2015 20:39
Lithium Logger configuration for JSON output
<?php
/**
* Lithium: the most rad php framework
*
* @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
use lithium\analysis\Logger;
@sobanvuex
sobanvuex / composer.sh
Last active June 27, 2017 20:12
Composer post-install script to create symlinks for Lithium Library autoloader
#!/bin/bash
# To use this file add the following to your composer.json:
#
# "scripts": {
# "post-install-cmd": [
# "bash composer.sh"
# ]
# }
@sobanvuex
sobanvuex / Logger.php
Last active December 31, 2015 05:29
Lithium Logger extension for ease of use
<?php
/**
* Lithium: the most rad php framework
*
* @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
namespace app\extensions\traits\analysis;
use lithium\analysis\Logger as LithiumLogger;
<?php
// auth.php
use lithium\security\Auth;
Auth::config([
'auth' => [
'adapter' => 'Form',
'fields' => [
// this configuration does not work
'email',
filter:
excluded_paths: []
tools:
php_analyzer:
enabled: true
extensions:
- php
filter:
paths: []