Skip to content

Instantly share code, notes, and snippets.

@keyurshah
keyurshah / .ideavimrc
Last active August 8, 2016 18:08
#dotfiles #vim ideavimrc settings
"how to reload settings in vim/phpstorm
":so %
set history=50 " number of command-lines that are remembered
set hlsearch " highlight matches with last search pattern
set ignorecase " ignore case in search patterns
set showmode " message on status line to show current mode
set smartcase " no ignore case when pattern has uppercase
set visualbell " use visual bell instead of beeping
@keyurshah
keyurshah / account-quality-score-analyzer
Last active August 8, 2016 18:06 — forked from derekmartinla/account-quality-score-analyzer
#google-adwords Google Adwords Quality Score Performance Analyzer
/**************************************************************************************
* AdWords Optimization -- Quality Score Performance Checker
* This script audits an account's quality score performance and creates a table that shows the
* distribution of CTR, Cost, & Conversins against Quality Score.
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com
**************************************************************************************/
function main() {
@keyurshah
keyurshah / pre-commit
Last active August 8, 2016 17:59 — forked from martinbean/pre-commit
#php Pre-commit hook to detect if any files contain dd()
#!/usr/bin/php
<?php
$files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD | grep "\.php$"');
$files = explode("\n", trim($files));
$exitCode = 0;
foreach ($files as $file) {
if (empty($file)) {
@keyurshah
keyurshah / convertExcel2Sheets
Last active August 8, 2016 18:06 — forked from azadisaryev/convertExcel2Sheets
#google_apps Google Apps Script for converting Excel (.xls or .xlsx) file to Google Spreadsheet. Drive API must be enabled in your script's Advanced Google Services and in Developers Console for the script to work (see https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services for details).
/**
* Convert Excel file to Sheets
* @param {Blob} excelFile The Excel file blob data; Required
* @param {String} filename File name on uploading drive; Required
* @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder
* @return {Spreadsheet} Converted Google Spreadsheet instance
**/
function convertExcel2Sheets(excelFile, filename, arrParents) {
var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not
@keyurshah
keyurshah / README.md
Created September 29, 2016 23:03 — forked from stephenway/README.md
BEMIT Cheatsheet
@keyurshah
keyurshah / parse_magento_images.ahk
Created October 13, 2016 17:05
Parse Magento images into separate directories
; Directives, keywords
#SingleInstance Force
;change path to source directory, i.e. C:\test\source\*.*
SourceDir = C:\test\source\*.*
Extensions := "jpg,png,tif,bmp,gif"
;change path to source directory, i.e. C:\test\destination
DestDir = C:\test\destination
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
@keyurshah
keyurshah / kanban.css
Created November 15, 2016 14:50 — forked from vickychijwani/kanban.css
A simple Trello clone in Eve (CSS ripped from Trello itself)
.board {
width: 100%;
height: 100%;
/* background-color: #0079bf; */
display: flex;
flex-direction: column;
}
.board,
.board textarea {
@keyurshah
keyurshah / uri.js
Created February 16, 2017 06:48 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@keyurshah
keyurshah / uri.js
Created February 16, 2017 06:48 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"