Skip to content

Instantly share code, notes, and snippets.

View floydpink's full-sized avatar

Hari Pachuveetil floydpink

View GitHub Profile
@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 / 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 / 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 / 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 / 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

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 / Question.js
Last active December 15, 2015 23:49
Question about loading a few favorite repositories from Travis using ember-data. This is for the Travis-CI Mobile I am trying to put together here - https://github.com/floydpink/Travis-CI-www. Thank you for your help.
// I have a bunch of repo ids in an array
var favoriteRepos = ["451069","538603","291565","425941","496588","189854","323203","668498","557554","7934","207993"];
// How do we go about loading all these repos with the current ember-data implementation and the Travis API?
// This would be the 'Favorites' screen I am trying to implement here - http://floydpink.github.io/Travis-CI-www/#/favorites
// This is what I have tried unsuccessfully so far:
// This is in the repo model - https://github.com/floydpink/Travis-CI-www/blob/master/js/app/models/Repo.js
Repo.reopenClass({
@floydpink
floydpink / .bashrc
Last active December 15, 2015 08:19
Start a new WEBrick instance at command prompt
HISTCONTROL=ignoredups:erasedups
HISTIGNORE=clear
PROMPT_COMMAND='history -a'
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
[[ -s $USERPROFILE/.pik/.pikrc ]] && source $USERPROFILE/.pik/.pikrc
SSH_ENV="$HOME/.ssh/environment"
//This code gives this error:
// Uncaught Error: assertion failed: Ember.Object.create no longer supports defining methods that call _super.
var App = Ember.Application.create({
init:function(){
this._super.deferReadiness();
}
});
@floydpink
floydpink / travis-secure-key-mac.sh
Last active March 6, 2021 22:18 — forked from lukewpatterson/gist:4242707
Generating secure environment variables for GitHub deployment keys to be used from a Travis-CI build.
# On a Mac, use this script to generate secure deployment key
# To generate secure SSH deploy key for a github repo to be used from Travis
base64 --break=0 ~/.ssh/id_rsa_deploy > ~/.ssh/id_rsa_deploy_base64
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r floydpink/harimenon.com)"
# If you don't have homebrew please install it from http://brew.sh/
brew install coreutils
gsplit --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_deploy_base64 id_rsa_
# To reconstitute the private SSH key from within the Travis-CI build (typically from 'before_script')