Skip to content

Instantly share code, notes, and snippets.

//
// NSArray+CollectionOperations.h
// MSAppKit
//
// Created by Jarod Luebbert on 1/4/13.
//
//
#import <Foundation/Foundation.h>
"""
List all retina assets (@2x) that have odd dimensions.
------------------------------------------------------
"""
import os
from re import search
from PIL import Image
from argparse import ArgumentParser
def read_input(input_filename="input.txt"):
with open(input_filename) as f:
return (line.rstrip().split(' ') for line in f.readlines())
def scramble_word(word):
if len(word) > 3:
from random import shuffle
middle = list(word[1:-1])
shuffle(middle)
new_word = word[0] + str.join('', middle) + word[-1]
"""
Detecting cycles
----------
Solution for the cycles challenge.
"""
def read_input(input_filename="input.txt"):
with open(input_filename) as f:
return (line.rstrip().split() for line in f.readlines())
The longest length found was: 15
The first longest substring was: rustlingofeachp
python substring.py 28.60s user 27.93s system 99% cpu 56.831 total
#import <Foundation/Foundation.h>
@interface NSString (charactersAsArray)
- (NSArray *)charactersAsArray;
@end
@jarodl
jarodl / GFFParallaxNode.h
Created November 3, 2011 22:54 — forked from rolandoam/GFFParallaxNode.h
GFFParallaxNode
//
// GFFParallaxNode.h
//
// Created by Rolando Abarca on 12/14/09.
//
#import <Foundation/Foundation.h>
#import "cocos2d.h"
#define MAX_PARALLAX_CHILDREN 25
#!/usr/bin/env python
import os
from subprocess import call
SPRITESHEET_SRC_DIR='Resources/Spritesheet Sources'
SPRITESHEET_DST_DIR='Generated/Spritesheets'
TEXTURE_PACKER='Tools/TexturePacker.app/Contents/MacOS/TexturePacker'
def main():
@jarodl
jarodl / CCDrawingPrimitives+ccDrawFillCircle.h
Created September 21, 2011 19:37
CCDrawingPrimitives+ccDrawFillCircle
//
// CCDrawingPrimitives+ccDrawFillCircle.h
// MindSnacks
//
// Created by Jarod L on 9/20/11.
// Copyright (c) 2011 MindSnacks. All rights reserved.
//
#import "CCDrawingPrimitives.h"
{
"from_user_id_str": "21640",
"profile_image_url": "http://a2.twimg.com/profile_images/1133121379/me-summer2010_normal.jpg",
"created_at": "Thu, 02 Jun 2011 19:38:05 +0000",
"from_user": "amrox",
"id_str": "76372030727004160",
"metadata": {
"result_type": "recent"
},
"to_user_id": null,