Skip to content

Instantly share code, notes, and snippets.

View thilak-rao's full-sized avatar
🎯
Focusing

Thilak Rao thilak-rao

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am xthilakx on github.
  • I am thilak (https://keybase.io/thilak) on keybase.
  • I have a public key ASDA7Lv1AQzEGX5dv7a6knTmDfuYNMNAQGIu53Vv4YfkZQo

To claim this, I am signing this object:

@thilak-rao
thilak-rao / gist:50f0da8dc4eaccf2ed6b000c6960b165
Created August 12, 2016 15:06
Frequently Used Regular Expressions
// Matching a alpha numeric username/password that is 3 to 16 charecters long
`/^[a-z0-9_-]{3,16}$/`
// Matching a hex value that begins with a hash, between 6 and 3 char long
`/^#?([a-f0-9]{6}|[a-f0-9]{3})$/`
// Regular expression that matches a email address
@thilak-rao
thilak-rao / .zshrc
Last active December 19, 2015 20:22
My .zshrc file
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.

Basic Server Setup

Install zsh and oh-my-zsh

# Obligatory
sudo apt-get update

sudo apt-get install -y zsh git-core
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@thilak-rao
thilak-rao / kendo-cheatsheet.md
Last active January 24, 2016 17:03
Work in Progress: Daily Cheatsheet

Kendo UI Cheatsheet

Formatting

About kendo.format

Replaces each format item in a specified string with the text equivalent of a corresponding object's value. Uses toString for every format item.

"""
Simple algorithm to download all the egghead.io videos in highest-quality from YouTube.
Run from the directory you want the videos to appear. Renames them so that they have the video number + omit the repetitive "Egghead.io - AngularJS -" text.
Installing dependency:
$ pip install git+https://github.com/NFicano/pytube#egg=pytube
"""
from pytube import YouTube #, exceptions as YTD_exceptions
@thilak-rao
thilak-rao / app.css
Created October 20, 2014 07:06
Pretty Redmine
@import url(http://fonts.googleapis.com/css?family=Roboto:400,300italic,300,100italic,100,400italic,500,500italic,700);
body {
font-family: 'Roboto', sans-serif;
font-weight: 300;
font-size: 14px;
}
div.description div.wiki {
-webkit-column-count: 2;
@thilak-rao
thilak-rao / gist:10811954
Created April 16, 2014 05:38
Bulk Unfollow Users from Quora
// Go to Quora. Go to your profile, click on "Following". Open your console, and paste this:
javascript:var elements = document.getElementsByClassName('follow_button unfollow_button');var i = 0;for(i=0;i<elements.length;i++)elements[i].click();
@thilak-rao
thilak-rao / Change Input Focus After Maxlength has been Reached
Created November 28, 2013 13:53
Once the maximum number of characters has been reached within a defined text fields, the focus is automatically set to the defined target of the element. This is the simplest method. Other jQuery plugins exists, but this is easier.
$("input[type=text]").on('input',function () {
if($(this).val().length == $(this).attr('maxlength')) {
$(this).next("input").focus();
}
});