Skip to content

Instantly share code, notes, and snippets.

View floydpink's full-sized avatar

Hari Pachuveetil floydpink

View GitHub Profile

Keybase proof

I hereby claim:

  • I am floydpink on github.
  • I am floydpink (https://keybase.io/floydpink) on keybase.
  • I have a public key whose fingerprint is F79E FDED 6BAC 4B7D C436 A838 9B5A 929A C7A3 F555

To claim this, I am signing this object:

@floydpink
floydpink / delete.bat
Created May 30, 2014 17:01
Remove a directory on Windows that has folder/files with 'path too long'
# Thanks to the answer on SuperUser - http://superuser.com/questions/45697/how-to-delete-a-file-in-windows-with-a-too-long-filename/467814#467814
mkdir empty_dir
robocopy empty_dir the_dir_to_delete /s /mir
rmdir empty_dir
rmdir the_dir_to_delete
@floydpink
floydpink / gmail-search-query.txt
Created July 15, 2014 16:15
Find Unlabeled Messages in Gmail
has:nouserlabels -in:inbox -in:drafts -in:starred -in:chats
@floydpink
floydpink / move-only-some-filetype-with-folder-structure.bat
Created August 11, 2014 21:06
Move only selected file types along with the folder structure on Windows
ROBOCOPY <Source> <Destination> pattern /E /MOV
@floydpink
floydpink / 2015-kollavarsham-calendar
Created August 10, 2015 12:45
Malayalam Calendar 2015
-------------------------------------------------------------------------
| 2015 January 1 Thursday | 1190 Dhanu 17 | Karthika |
-------------------------------------------------------------------------
| 2015 January 2 Friday | 1190 Dhanu 18 | Rohini |
-------------------------------------------------------------------------
| 2015 January 3 Saturday | 1190 Dhanu 19 | Makiryam |
-------------------------------------------------------------------------
| 2015 January 4 Sunday | 1190 Dhanu 20 | Thiruvathira |
-------------------------------------------------------------------------
| 2015 January 5 Monday | 1190 Dhanu 21 | Thiruvathira |
@floydpink
floydpink / sp_open_new_window.js
Created December 5, 2012 19:45
Adding a 'Open in a new window' link on SharePoint document libraries
$(document).ready(function() {
$("td[class='ms-vb-title'] table[class='ms-unselectedtitle'] tbody tr td[class='ms-vb'] a").each(function() {
var externalWindowLink = ' <a href="' + $(this).attr("href") + '" target="_blank" title="Click here to open the link in a new window"><span style="color:green;font-size:smaller;">New Window</span></a>';
$(this).parent().append(externalWindowLink);
});
});
@floydpink
floydpink / sortDropDownListByText.js
Created December 5, 2012 19:48
Sort dropdown/select list items using jQuery
function sortDropDownListByText(dropdownlist) {
dropdownlist.children("option[value='']").remove();
// Sort all the options by text
dropdownlist.html($("option", dropdownlist).sort(function(a, b) {
return a.text === b.text ? 0 : a.text < b.text ? -1 : 1;
}));
dropdownlist.prepend(' ');
dropdownlist.children("option[value='']").attr('selected', 'selected');
@floydpink
floydpink / jQueryMap.html
Created December 5, 2012 19:52
Array.Min, Array.Max and jQuery.map()
<span id="toolbar">
<a title="Link 1" tabindex="-1" href="#"></a>
<a title="Link 1" tabindex="-2" href="#"></a>
</span>
@floydpink
floydpink / detect_jQuery.js
Created December 5, 2012 19:54
Detect jQuery
if (!$ || !$['fn']) throw new Error('jQuery library is required.');
@floydpink
floydpink / runtimeTypes.vb
Created December 5, 2012 19:55
Creating dynamic types in VB.NET
Public Function Build() As String
Dim json = String.Empty
Dim assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(New AssemblyName(_topLevelObjectName), AssemblyBuilderAccess.RunAndSave)
Dim moduleBuilder = assemblyBuilder.DefineDynamicModule(_topLevelObjectName, String.Format("{0}.dll", _topLevelObjectName))
Dim typeBuilder = moduleBuilder.DefineType(_topLevelObjectName, TypeAttributes.Class Or TypeAttributes.Public)
Dim constructorBuilder = typeBuilder.DefineConstructor(MethodAttributes.Public,
CallingConventions.Standard,
Nothing)
Dim constructorIL = constructorBuilder.GetILGenerator()