Skip to content

Instantly share code, notes, and snippets.

View vishnuratheesh's full-sized avatar
🔭

Vishnu Ratheesh vishnuratheesh

🔭
View GitHub Profile
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
PATH=/usr/local/bin:$PATH
PATH=$HOME/bin:$PATH
PATH=$PATH:/usr/local/sbin
export PATH
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
@vishnuratheesh
vishnuratheesh / get-weather-by-address.html
Created February 15, 2016 08:56 — forked from marchawkins/get-weather-by-address.html
Using the OpenWeatherMap and Google's geolocation APIs to get the current weather for the user-specified location. The user inputs a location, which is geocoded using Google Maps API. Uses the OpenWeatherMap API ((http://openweathermap.org/)) to get the data. Data is returned in JSON format. Most major browsers supported, including IE9, Chrome, …
<div class="row">
<div class="col-md-2 col-sm-2 col-xs-2">
<p><button class="btn btn-primary btn-sm" id="get-weather-btn"><span>Get Weather</span></button></p>
</div><!-- .col -->
<div class="col-md-10 col-sm-10 col-xs-10">
<div class="panel panel-default">
<div class="panel-heading">Weather &amp; Location Response</div>
<div class="panel-body">
<p>Enter Address: <input id="address" type="text" class="form-control"/></p>
<p>Lat/Long: <input id="location-lat-long" type="text" class="form-control"/></p>
{
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": ".",
"selector": "source.js"
@vishnuratheesh
vishnuratheesh / es_install.sh
Last active September 17, 2015 03:25
ElasticSearch Installation
Install JRE/JDK 7 or 8: http://www.2daygeek.com/openjdk-8-installation-ubuntu/
Elastic Search:
sudo apt-get install elasticsearch 1.7.2
@vishnuratheesh
vishnuratheesh / mysql.sh
Last active August 29, 2015 14:25
django-debug-toolbar
rm /usr/local/var/mysql/*.err
cd /usr/local/var/
ls -l
sudo chown -R mysql:mysql mysql/
sudo mysql.server start
sudo mysql.server restart
sudo mysql.server stop
sudo mysql_upgrade
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is free to use by anyone (MIT, blabla).
// Author: rkorving@wizcorp.jp
var timeouts = {};
var intervals = {};