Skip to content

Instantly share code, notes, and snippets.

Addresses issue: #

Preflight (optional)

  • List work to be done before PR can be reviewed
  • Keep this as brief as possible, this is not a place for storytelling
  • bundle install or bundle exec pod install
  • Reading some backstory
  • Set up credentials someuser@domain.com/password in the “foo” database
@adamyanalunas
adamyanalunas / post-install
Created February 5, 2015 17:31
A git post-install to update your pods, if needed
#!/bin/bash
PREVIOUS_HEAD=$1
NEW_HEAD=$2
BRANCH_SWITCH=$3
if [[ $BRANCH_SWITCH == "1" && $PREVIOUS_HEAD != $NEW_HEAD ]]; then
# Kill the simulator.
SIM=`pgrep 'iPhone Simulator'`
@adamyanalunas
adamyanalunas / omg.m
Created November 8, 2014 00:22
What's wrong with this picture?
@interface Foo : NSObject
@property (nonatomic, assign)double ClassId, collegeId;
@property (nonatomic, retain)NSString *name, *date;
@end
@implementation Foo
@synthesize ClassId, collegeId;

Keybase proof

I hereby claim:

  • I am adamyanalunas on github.
  • I am adamyanalunas (https://keybase.io/adamyanalunas) on keybase.
  • I have a public key whose fingerprint is 7E9D DFEF B640 4696 DBC6 97AF BFA8 7AD7 D1AA 2CFC

To claim this, I am signing this object:

{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 4,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
@adamyanalunas
adamyanalunas / clever.m
Created March 25, 2014 23:25
Can I use objc_getAssociatedObject to read 3rd party ivars hidden behind @implementation?
@interface THObserver (RevealYourSecrets)
@property (nonatomic, strong) id block;
@end
@implementation THObserver (RevealYourSecrets)
@dynamic block;
@adamyanalunas
adamyanalunas / dummy_server.sh
Created October 23, 2013 00:04
Create a local, dummy API server that will dump out any request received
# Listen on port 5000
nc -k -l 5000
# Test by posting a JSON file
curl -X POST -d @filename.txt http://local.devmachine/path/to/resource --header "Content-Type:application/json"
@adamyanalunas
adamyanalunas / 1.js
Created August 20, 2013 16:41 — forked from padolsey/1.js
/x/==x
@adamyanalunas
adamyanalunas / scrubadub_mixpanel.js
Last active December 18, 2015 01:59
Making real JSON from Mixpanel's dump API.
var takeDump = function(foo, bar, body) {
// The "body" is the raw response from https://data.mixpanel.com API
// At this point there are line returns (\n) separating each event and the list of events is not wrapped in an array literal ([])
// Take out line returns and replace with proper comma separators
var tight = body.replace(/[\n\r\t]/g, ',');
// To return a list you've got to wrap it in an array
// There's a trailing newline returned, hence the substring snip
var wrapped = '[' + tight.substring(0, tight.length-1) + ']';
@adamyanalunas
adamyanalunas / base.css
Created May 30, 2013 16:34
Fix the chat so the × icon and text don't compete for layout space (and other UI tweaks).
.activity-text {
padding-right: 22px;
}
.activity-item .activity-delete {
top: 9px;
}
.activity-item:hover .activity-delete {
opacity: .75;