Skip to content

Instantly share code, notes, and snippets.

View LoganathanB's full-sized avatar

Loganathan B LoganathanB

View GitHub Profile
@LoganathanB
LoganathanB / groupedStrings
Last active August 29, 2015 14:11
Answer for challenge #3 in http://140swift.tumblr.com
@140Swift
let s = ["abeforth", "albus", "bagshot", "bellatrix", "black"]
let groupedStrings: [[String]] = {
var r:[[String]]=[]
var n = [s[0]]
for (i,v) in enumerate(s) {
if i != 0 {
if (String(Array(v)[0]) == String(Array(n[n.count-1])[0])) {
n.append(v)
} else {

Keybase proof

I hereby claim:

  • I am LoganathanB on github.
  • I am loganathan (https://keybase.io/loganathan) on keybase.
  • I have a public key whose fingerprint is 2126 9BB9 9563 4F90 F3F2 7DBB E749 56FC 0F3A 9905

To claim this, I am signing this object:

@import MobileCoreServices;
static CFStringRef UTTypeForImageData(NSData *data) {
const unsigned char * bytes = [data bytes];
if (data.length >= 8) {
if (bytes[0] == 0x89 && bytes[1] == 0x50 && bytes[2] == 0x4E && bytes[3] == 0x47 && bytes[4] == 0x0D && bytes[5] == 0x0A && bytes[6] == 0x1A && bytes[7] == 0x0A) {
return kUTTypePNG;
}
}
@LoganathanB
LoganathanB / cocoapod_commands
Created March 26, 2014 06:23
Cocoapods commands
Install:
$sudo gem install cocoapods
$pod setup
$pod list
$pod search AFN
In Repo:
$touch Podfile
$open -e Podfile

PyCHO PyCon Digest - Tue Apr 9 6pm at WillowTree Apps

It's a Python meetup. Please promote in your circles!

Join us for a lively discussion where Charlottesville's PyCon 2013 attendees will share their highlights of the world's biggest Python conference. You can watch PyCon videos online for free, so you should come and find out which ones to watch! You will walk away with a few new Python tools you can use every day, too.