Skip to content

Instantly share code, notes, and snippets.

View vrkansagara's full-sized avatar
😀
Coding :-)

Vallabh Kansagara vrkansagara

😀
Coding :-)
View GitHub Profile
@vrkansagara
vrkansagara / tmux.conf
Created May 28, 2016 10:09 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@vrkansagara
vrkansagara / Laravel-View-Option-Group
Last active November 10, 2016 06:14 — forked from sineld/optgroup.php
Laravel: Using form::select with <optgroup>
<?php
//Source: http://forums.laravel.com/viewtopic.php?id=2807
Route::get('optgroup', function()
{
$eat_options = array(
'animals' => array(
'cats',
'dogs',
'monkeys',
@vrkansagara
vrkansagara / rm_mysql.md
Created January 4, 2017 02:50 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@vrkansagara
vrkansagara / iterm2-solarized.md
Created January 26, 2017 07:50 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@vrkansagara
vrkansagara / crypt.php
Created February 24, 2017 16:01 — forked from leonjza/crypt.php
Laravel Crypt encryptor / decryptor.
<?php
/*
* Quick 'n Dirty Laravel 5.1 decrypter.
*
* Based directly off the source code at:
* https://github.com/laravel/framework/blob/5.1/src/Illuminate/Encryption/Encrypter.php
*
* Have access to an application key from a .env?
* Have some encrypted data you want to decrypt?
* Well: (new Crypt($key))->decrypt($payload); should have you sorted
@vrkansagara
vrkansagara / centos7_ambiente_desenvolvimento.md
Created March 27, 2017 03:34 — forked from marciopaiva/centos7_ambiente_desenvolvimento.md
CentOS 7 - Apache 2.4 + MOD_PROXY_FCGI + PHP-FPM 5.5 + InstantClient Oracle.

CentOS 7 - Apache 2.4 + PHP-FPM 5.5 + InstantClient Oracle.


Montando uma VM para o desenvolvimento de aplicações em PHP, utilizado o CentOS 7

@vrkansagara
vrkansagara / letsencrypt.yourdomain.conf
Created April 4, 2017 20:09 — forked from nwgat/letsencrypt.yourdomain.conf
lighttpd letsencrypt ssl conf
combine files into ssl.pem
sudo su (login as root)
cd /etc/letsencrypt/live/yourdomain
cat privkey.pem cert.pem > ssl.pem
Forward Secrecy & Diffie Hellman Ephemeral Parameters
cd /etc/ssl/certs
openssl dhparam -out dhparam.pem 4096
Copy and paste the following into /etc/lighttpd/lighttpd.conf dont forget to change yourdomain to your domain
@vrkansagara
vrkansagara / beanstalkd.conf
Created July 13, 2017 00:13 — forked from seyhunak/beanstalkd.conf
Beanstalkd - Supervisord
### /etc/supervisor/conf.d/beanstalkd.conf
[program:beanstalkd]
command=/usr/local/bin/beanstalkd.sh
directory=/home/rails
user=ubuntu
startsecs=10
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/beanstalkd.log
@vrkansagara
vrkansagara / tree.php
Created October 25, 2017 14:06 — forked from ralphschindler/tree.php
'tree' console command, in PHP.
#!/usr/bin/php
<?php
/**
* Because you want "tree", but cannot find the source code quick enough
* on the web to compile for OS.X or there is no suitable implementation
* on windows.
*/
// set error reporting
error_reporting(E_STRICT | E_ALL);
<?php
setup();
$t = new Tree('top', 'T');
$t->append(new TreeNode('one', 1));
$t->append($x = new TreeNode('two', 2));
$t->append(new TreeNode('three', 3));
$t->append(new TreeNode('foo', 'foo'));