Skip to content

Instantly share code, notes, and snippets.

View tusharvikky's full-sized avatar
💭
contemplating...

Tushar Deo tusharvikky

💭
contemplating...
View GitHub Profile
@tusharvikky
tusharvikky / gist:3047250
Created July 4, 2012 13:08 — forked from hileon/gist:1311735
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@tusharvikky
tusharvikky / reserved_usernames.rb
Created August 1, 2012 20:30 — forked from caseyohara/reserved_usernames.rb
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@tusharvikky
tusharvikky / CI_Date.php
Created September 14, 2012 19:07 — forked from kylefarris/CI_Date.php
Codeigniter Date Library
<?php
class CI_Date {
public $sec_in_min, $min_in_hour, $hr_in_day, $day_in_wk, $sec_in_wk, $sec_in_day, $min_in_wk, $min_in_day, $hr_in_wk;
public function __construct() {
$this->sec_in_min = 60;
$this->min_in_hr = 60;
$this->hr_in_day = 24;
$this->day_in_wk = 7;
$this->day_in_yr = 365;
$this->sec_in_hr = $this->sec_in_min * $this->min_in_hr;
@tusharvikky
tusharvikky / snippet.xml
Created October 21, 2012 15:01 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@tusharvikky
tusharvikky / gist:4527478
Created January 14, 2013 03:00
Gist to reboot Linksys Router with just a single click. [BookMark it]
192.168.1.1/setup.cgi?todo=reboot
@tusharvikky
tusharvikky / select_var.html
Last active December 11, 2015 04:38
Friend Requests: This gist will fetch the value of the select and will log it in console.
<!-- Author: @tusharvikky -->
<!-- Created: 16th Jan 2013 -->
<html>
<head>
<title>Grab select value</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#button").click(function(e){
e.preventDefault(); // This is just to prevent re submitting of form again as default jquery.
<?php
/**
* Ranking Library
* contains alogrithms for story ranking
* Basically a PHP Implementation of reddits algorithms
*
* @author Lucas Nolte <lnolte@i.biz>
* @since 0.1
* @package Polska Wiadomosc
* @subpackage Libraries
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dynamic Gist Embedding</title>
</head>
<body>
<p>
# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit
@tusharvikky
tusharvikky / luna.md
Created August 12, 2013 10:54 — forked from jensk/luna.md