Skip to content

Instantly share code, notes, and snippets.

@nit3ch
nit3ch / gist:9340803
Created March 4, 2014 05:31
How to automatically group/wrap n elements with a div?
http://forum.jquery.com/topic/how-to-automatically-group-wrap-n-elements-with-a-div
@nit3ch
nit3ch / gist:9340790
Created March 4, 2014 05:29
Forcing Flag To Be Unique In Drupal 7
http://drupal.stackexchange.com/questions/21133/forcing-flag-to-be-unique-in-drupal-7
@nit3ch
nit3ch / gist:9340776
Created March 4, 2014 05:28
Undo 'git add' before commit
You can also git reset HEAD <file>, which will remove it from the current index (the "about to be committed" area) without changing anything else.
REF: http://stackoverflow.com/questions/348170/undo-git-add-before-commit
@nit3ch
nit3ch / csvtoarray
Created January 24, 2014 10:29
Script to convert csv file to php array
<?php
$one= array();
$handle = @fopen("file_name.csv", "r");
//$content = file_get_contents('hello.csv');
//print_r($content);
if ($handle) {
while (($row = fgetcsv($handle, 7000)) !== false){
//$key =array($row[0]);
//$value = array($row[1]);
@nit3ch
nit3ch / grey
Last active January 3, 2016 13:39
50 shades of Grey
#272727, #282828, #292929, #2b2b2b, #2c2c2c, #2e2e2e, #313131, #323232, #343434, #353535, #373737, #393939, #3a3a3a, #3c3c3c, #3f3f3f, #404040, #424242, #444444, #454545, #474747, #484848, #4a4a4a, #4b4b4b, #4d4d4d, #4e4e4e, #505050, #515151, #535353, #565656, #575757, #585858, #595959, #5b5b5b, #5c5c5c, #5e5e5e, #616161, #626262, #646464, #656565, #676767, #6a6a6a, #6b6b6b, #6c6c6c, #6d6d6d, #6f6f6f, #727272, #737373, #757575, #767676, #777777, #7b7b7b, #7c7c7c, #7d7d7d, #7e7e7e, #808080, #818181, #838383, #868686, #878787, #888888, #898989, #8b8b8b, #8c8c8c, #8e8e8e, #919191, #929292, #949494, #959595, #979797, #9a9a9a, #9b9b9b, #9c9c9c, #9d9d9d, #9f9f9f, #a0a0a0, #a2a2a2, #a5a5a5, #a6a6a6, #a8a8a8.
@nit3ch
nit3ch / index.html
Created May 10, 2013 07:19
A CodePen by Nitesh Kumar. Real time greeting. - Hello world app for jquery.
Enter your name :
<input id="name" type="text">
<h2 id='greeting'></h2>