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 / 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 / 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 / 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 / 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 / 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 / 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 / getBlockLists.sh
Last active May 14, 2016 11:16 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| grep -A 2 Bluetack \
| sed -n "s/.*value='\(http:.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#' \
| gzip - > bt_blocklist.gz

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@vrkansagara
vrkansagara / js.js
Created May 3, 2016 09:42 — forked from bekapod/js.js
MAGENTO: Remotely trigger a Varien tab
Varien.Tabs = Class.create();
Varien.Tabs.prototype = {
initialize: function(selector) {
var self=this;
$$(selector+' a').each(this.initTab.bind(this));
},
initTab: function(el) {
el.href = 'javascript:void(0)';
if ($(el.parentNode).hasClassName('active')) {
@vrkansagara
vrkansagara / active.md
Created February 23, 2016 11:55 — forked from paulmillr/active.md
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Mon, 01 Dec 2014 00:48:25 GMT till Tue, 01 Dec 2015 00:48:25 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 508)