Skip to content

Instantly share code, notes, and snippets.

View sayanee's full-sized avatar
🎯
Focusing

Sayanee Basu sayanee

🎯
Focusing
View GitHub Profile
var osmosis = require('osmosis')
var ingredient = 'Sodium Benzoate'
osmosis
.get('https://www.ewg.org/skindeep/search.php?query=' + ingredient + '&h=Search')
.find('#table-browse > tr[2]')
.set({
'ingredient': 'td[2]',
'score': 'td[3] > div > div > a > img@src'
})
@sayanee
sayanee / ergo.md
Last active November 12, 2017 06:22
Simple habits for a pain-free mobility

Keybase proof

I hereby claim:

  • I am sayanee on github.
  • I am sayanee (https://keybase.io/sayanee) on keybase.
  • I have a public key ASAKV_89hrD-VE8xKdEWRJAV6-1m-NG_pTIqwocVmKqm0Ao

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am sayanee on github.
  • I am sayanee (https://keybase.io/sayanee) on keybase.
  • I have a public key ASAzWMhk7qeDrj4GRqCdGL50lI4MZayZTvrIFZjJsQHJTgo

To claim this, I am signing this object:

@sayanee
sayanee / iojs-rpi2.md
Last active August 29, 2015 14:17
iojs on raspberry pi 2 with raspbian
  1. If using Raspbian Wheezy, then upgrade to Jessie with these instructions.
  • Install nvm with curl command
  • Install iojs with nvm: nvm install iojs
  • revert to Wheezy in Step 1
  • install Chromium with sudo apt-get install chromium
@sayanee
sayanee / bash_update.sh
Created September 29, 2014 03:27
update bash to patch remote code exploitation
#!/bin/bash
# context: http://www.infoq.com/news/2014/09/bash-remote-exploit
# credit: http://stackoverflow.com/questions/16416195/how-do-i-upgrade-bash-in-mac-osx-mountain-lion-and-set-it-the-correct-path
brew upgrade && brew update
brew install bash
mv /bin/bash /bin/bash.old
ln -s /usr/local/bin/bash /bin/bash
# create bower.json with a version EG: 0.1.0
# create a git repo EG: https://github.com/sayanee/timeline-css
npm install -g bower
bower register <package-name> <git-url> # EG: bower register timeline-css git@github.com:sayanee/timeline-css.git
bower info <package-name> # No available versions shown
git tag -a <version-no> -m "<comment>" # EG: git tag -a 0.1.0 -m "first version"
git push <remote-name> <version-no> # EG: git push origin 0.1.0
1. download [chrome](https://www.google.com/intl/en/chrome/browser/) and login to my account - change downloads to Desktop path
1. app store apps - LimeChat, Sketch, Codebox, LiveReload, Mindful Myna, XCode, Dash, Evernote, Skitch, Pomodoro
1. xcode command line tools
1. sublime text 3 - link with [subl](http://www.sublimetext.com/docs/3/osx_command_line.html), install [package control](https://sublime.wbond.net/installation), syntax highlighting, sidebar enchancement, preferences, key bindings
1. [iTerm2](http://www.iterm2.com/#/section/home), Pref > Text> Monaco 18, Pointer > Focus follow mouse
1. [iTerm2To](https://github.com/jbtule/cdto), [Solarized theme](https://github.com/altercation/solarized/tree/master/iterm2-colors-solarized)
1. oh my zsh
1. System Pref - Dock to the left and hide, install hot corners
1. [Shiftitapp](https://github.com/fikovnik/ShiftIt)
1. [AlfredApp]
@sayanee
sayanee / README.md
Last active May 10, 2019 00:48 — forked from evandrix/README.md

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.

How to use MAMP with the mysql2 gem and Ruby 1.9.3-p194 via rbenv

Let's say you're a web developer who happens to work with both MAMP and Ruby when building different types of websites. Let's say you also like to keep your MySQL stuff in one place and don't like having to juggle both a local MySQL install as well as a MAMP MySQL install. Well, you can indeed connect your ruby apps to MAMP's MySQL. Here's a tutorial on how to do it.

Important! Before you do anything, download and install MAMP. MAMP Pro will work as well. At the time of this writing, MAMP 2.1.1 is the latest.

First, install Ruby via rbenv

  1. Install homebrew
  2. Install rbenv: brew install rbenv, follow any instructions homebrew gives you after the installation is complete.