Skip to content

Instantly share code, notes, and snippets.

View floydpink's full-sized avatar

Hari Pachuveetil floydpink

View GitHub Profile
@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 / heightForRowAtIndexPath.swift
Created December 17, 2014 05:01
Swift UITableView set rowHeight [question on SO]
class MyController: UITableViewController, UITableViewDelegate, UITableViewDataSource {
// ...
var sizingSectionCell: SectionTableViewCell?
// ...
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
var onceToken: dispatch_once_t = 0
dispatch_once(&onceToken) {
self.sizingSectionCell = self.sectionsView.dequeueReusableCellWithIdentifier(self._sectionCellReuseIdentifier) as? SectionTableViewCell
}
@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 / UISwiftRestDemo.swift
Created November 12, 2015 19:15 — forked from cmoulton/UISwiftRestDemo
Quick & dirty REST API calls with Swift. See http://grokswift.com/simple-rest-with-swift/
// MARK: Using NSURLSession
// Get first post
let postEndpoint: String = "http://jsonplaceholder.typicode.com/posts/1"
guard let url = NSURL(string: postEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = NSURLRequest(URL: url)
@floydpink
floydpink / app.html
Created July 11, 2016 22:43 — forked from jdanyow/app.html
How to conditionally display client-side data with Aurelia
<template>
<ul>
<li repeat.for="obj of data" if.bind="obj.customDataType">
<span>${obj.customDataType.cdt}</span> -
<strong repeat.for="cda of obj.customDataArray">${cda}, </strong>
</li>
<li repeat.for="obj of data" if.bind="!obj.customDataType">
<span>No CustomDataType</span> -
<strong repeat.for="cda of obj.customDataArray">${cda}, </strong>
</li>
@floydpink
floydpink / app.html
Created February 2, 2017 22:31 — forked from hfitzwater/app.html
Aurelia Validation Demo
<!--
__ __ _ _ _ _ _ _____ _
\ \ / / | (_) | | | | (_) / ____| |
\ \ / /_ _| |_ __| | __ _| |_ _ ___ _ __ | | | |__ __ _ _ __ __ _ ___ ___
\ \/ / _` | | |/ _` |/ _` | __| |/ _ \| '_ \ | | | '_ \ / _` | '_ \ / _` |/ _ \/ __|
\ / (_| | | | (_| | (_| | |_| | (_) | | | | | |____| | | | (_| | | | | (_| | __/\__ \
\/ \__,_|_|_|\__,_|\__,_|\__|_|\___/|_| |_| \_____|_| |_|\__,_|_| |_|\__, |\___||___/
__/ |
|___/
@floydpink
floydpink / bookmarklet.js
Last active April 4, 2017 00:08
SMC Webfonts Bookmarklet
var fonts = [{
name: 'meera',
font: 'Meera'
}, {
name: 'rachana',
font: 'Rachana'
}, {
name: 'dyuthi',
font: 'Dyuthi'
}, {
@floydpink
floydpink / malayalam-pangram
Created April 5, 2017 08:50
Malayalam pangram
ഇംഗ്ലിഷിലെ 26 അക്ഷരങ്ങളും അടങ്ങുന്ന ഒരു വാക്യം ഇതാ:
THE QUICK BROWN FOX JUMPS OVER A LAZY DOG.
ഇത്തരത്തിലുള്ള വാക്യങ്ങൾ PANGRAM എന്ന പേരിലാണ് അറിയപ്പെടുന്നത്.
മലയാളത്തിൽ ആ വാക്യം --
അജവും ആനയും ഐരാവതവും ഗരുഡനും കഠോരസ്വരം പൊഴിക്കെ ഹാരവും ഒഢ്യാണവും ഫാലത്തിൽ മഞ്ഞളും ഈറൻ കേശത്തിൽ ഔഷധ എണ്ണയുമായി ഋതുമതിയും അനഘയും ഭൂനാഥയുമായ ഉമ ദു:ഖഛവിയോടെ ഇടതു പാദം ഏന്തി ങ്യേയാദൃശം നിർഝരിയിലെ ചിറ്റലകളെ ഓമനിക്കുമ്പോൾ ബാലയുടെ കൺകളിൽ നീർഊർന്നു വിങ്ങി.
സംഭവം ഒരു ഒന്നന്നര സംഭവം തന്നെ കാരണം മലയാള അക്ഷരമാലയിലെ എല്ലാ അക്ഷരങ്ങളും ഈ വാക്യത്തിൽ ഉണ്ട്.😝😝😜k