Skip to content

Instantly share code, notes, and snippets.

View shashankmehta's full-sized avatar

Shashank Mehta shashankmehta

View GitHub Profile
shashankmehta /
Last active January 7, 2024 11:57
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
shashankmehta / placements.js
Created December 14, 2014 20:41
IITR Placement updates
var cheerio = require('cheerio');
var request = require('request');
var fs = require('fs');
var exec = require('child_process').exec;
var twitterAPI = require('node-twitter-api');
var phpsessid = '<get it from your channeli account. Chrome developer console is your friend>';
var consumerKey = '<get it from twitter.js>';
var consumerSecret = '<get it from twitter.js>';
var accessToken = '<get it from twitter.js>';

Keybase proof

I hereby claim:

  • I am shashankmehta on github.
  • I am shashankmehta ( on keybase.
  • I have a public key whose fingerprint is FBEE 05D6 4B5D 7160 8B09 2FB8 EE79 6CBF CE2D 2FD9

To claim this, I am signing this object:

"developer": 201,
"startup": 89,
"php": 62,
"engineer": 55,
"web": 51,
"wanted": 50,
"android": 49,
"looking": 41,
"designer": 41,
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;

I hate to use backup applications. There, I said it. This is because:

  1. Many use proprietary/weird formats for backing up data.
  2. Backing up is always easy and this ease is advertised but recovery has never been easy.
  3. I don't really want to handle the overload of applications settings/features/tools/services whatnots just for a simple backup.

Since I use Ubuntu on daily basis, I tried Deja Dup. As advertised, the backup process is painless. Soon I had snapshots of files for last 7 days. But one day when I tried to revert a file to a three day old snapshot the experience turned out to be horrible. It took insane amount of time to revert a 10kB file. If Deja Dup was not using its own format recovery would have been as easy as cp /path/to/backed/up/file /path/to/actual/file. Even when backup softwares don't use their own format, the number of options/settings that they provide are useless for me. I don't need the cruft.

Any experienced Linux guy would have realised by now what I'm getting at. When

shashankmehta / gnome.markdown
Created September 4, 2012 13:59
Gnome shell tweaks

I use GNOME instead of Unity.

I especially love the overview available in gnome. But I find the icon sizes to be too large. If you want to edit the size of icons in the applications tab then you have to edit the gnome-shell.css file. This was just a google search away. But if you want to change the size of icons in dock then google doesn't have the answer. You can't change it by editing the css file. This is because the size of the dock changes dynamically as and when applications are added or deleted. So:

To change the size of icons in application launcher/dock on the left in overview mode, you need to edit the js that is handling this.

sudo gedit /usr/share/gnome-shell/js/ui/dash.js

Edit the line

shashankmehta /
Last active October 9, 2015 19:47
Bash aliases for Git
# Initially sourced from
alias ga='git add'
alias gp='git push'
alias gl='git log'
alias gs='git status'
alias gd='git diff'
alias gdc='git diff --cached'
alias gc='git commit'
alias gca='git commit -a'
shashankmehta / gspjson.txt
Created August 31, 2012 11:06
Fetching Google Spreadsheet in JSON
File -> Publish To The Web
To get it in JSON:
Get a link to the published -> Set it as 'RSS'
In the link generated, replace
shashankmehta / gist:3508831
Created August 29, 2012 09:02 — forked from abhshkdz/
Building up Hubot on Gtalk (deployed on Heroku)
tar zxvf hubot-*.tar.gz
cd hubot/
vim Procfile
app: bin/hubot -a gtalk -n Hubot
vim package.json
"name": "hosted-hubot",
"version": "2.2.0",