Skip to content

Instantly share code, notes, and snippets.

Verifying my Blockstack ID is secured with the address 1GaEBfFWjUDqGbdQoogDfYiMGHaJz7YMaw https://explorer.blockstack.org/address/1GaEBfFWjUDqGbdQoogDfYiMGHaJz7YMaw
@alanthonyc
alanthonyc / UIImageExtras.m
Created August 17, 2015 15:11
Crop, Resize, Etc. a UIImage
@implementation UIImage (Extras)
// from this SO: http://stackoverflow.com/a/605385
#pragma mark -
#pragma mark Scale and crop image
- (UIImage*)imageByScalingAndCroppingForSize:(CGSize)targetSize
{
UIImage *sourceImage = self;
UIImage *newImage = nil;
//
// HTTPConstants.h
// Heartagram
//
// Created by Anthony Castillo on 3/11/15.
// HTTP status codes. Reference: http://www.django-rest-framework.org/api-guide/status-codes/
#ifndef HTTPConstants_h
#define HTTPConstants_h
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
@alanthonyc
alanthonyc / .gitignore
Last active August 29, 2015 14:09 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.3
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#

Keybase proof

I hereby claim:

  • I am alanthonyc on github.
  • I am anthonyc (https://keybase.io/anthonyc) on keybase.
  • I have a public key whose fingerprint is 65C0 E92C BBDF DECB 3ACE 75FB DBCC E4CE 34F2 B5E1

To claim this, I am signing this object:

@implementation UIView (FindFirstResponder)
- (id)findFirstResponder
{
if (self.isFirstResponder) {
return self;
}
for (UIView *subView in self.subviews) {
id responder = [subView findFirstResponder];
if (responder) return responder;
}
@alanthonyc
alanthonyc / bootstrap-carousel-snippet
Created January 25, 2013 22:11
sample for bootstrap carousel
@alanthonyc
alanthonyc / Constants.h
Created May 13, 2012 22:26
Global Header File for Objective-C / iOS
//
// Constants.h
//
// Created by Anthony Castillo on 5/11/12.
//
#ifndef MyApp_Constants_h
#define MyApp_Constants_h
#define ONE_DAY 86400
import simplejson
import networkx as nx
#http://mlg.ucd.ie/files/summer/tutorial.pdf
from networkx.algorithms import bipartite
g = nx.Graph()
#need to bring in reutersJournalistList
users=simplejson.loads(reutersJournalistList)