Skip to content

Instantly share code, notes, and snippets.

View shanev's full-sized avatar
💭
#BUIDL

shane.stars shanev

💭
#BUIDL
View GitHub Profile
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:10.0f]
forKey:kCATransactionAnimationDuration];
theView.layer.opacity = 0.0;
[CATransaction commit];
@shanev
shanev / shorttimeago.swift
Last active August 29, 2015 14:19
"Short time ago" function for Swift (based on https://github.com/MatthewYork/DateTools)
func shortTimeAgoSinceDate(date: NSDate) -> String {
let calendar = NSCalendar.currentCalendar()
let unitFlags = NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitWeekOfYear | NSCalendarUnit.CalendarUnitMonth | NSCalendarUnit.CalendarUnitYear | NSCalendarUnit.CalendarUnitSecond
let now = NSDate()
let earliest = now.earlierDate(date)
let latest = (earliest == now) ? date : now
let components:NSDateComponents = calendar.components(unitFlags, fromDate: earliest, toDate: latest, options: nil)
if (components.year >= 1) {
return "\(components.year)y"
iTunes will display the Identifier if you click on the Serial Number after selecting the device in the source list. Pressing Cmd-C (Mac) or Ctrl-C (Windows) will copy the 40 character hex string to the clipboard.
1. Download the provisioning profile: http://s3.amazonaws.com/crimsonjet/Ad_Hoc_Distribution_Profile-4.mobileprovision
2. Drag the provisioning profile over your iTunes icon in the Dock.
3. Sync the device.
4. Verify that the profile shows up in Settings → General → Profiles (on your iPhone).
5. Download the app: http://s3.amazonaws.com/crimsonjet/Anthem.zip
6. Unzip the app and drag the application file to the Applications tab in iTunes
7. Sync the device again.
I'd love some feedback on Anthem. I hope you guys like it!
Thanks a lot for willing to help debug Drum Kit. Getting a crash log
is pretty complicated, so before that I'm going to try to see if there
are any errors in the log files instead. First, install this:
http://www.apple.com/support/downloads/iphoneconfigurationutility10formacosx.html
I hope you're on a Mac. If not I'll have to find another way.
After installing it, attach your iPhone/iPod and run Drum Kit. After
it crashes, select the device from the "Connected Devices" tab, and
Thanks a lot for willing to help debug Strength. Lets see if there
are any errors in the log files. First, install this:
Mac: http://support.apple.com/downloads/iPhone_Configuration_Utility_1_1_for_Mac_OS_X
Windows: http://support.apple.com/downloads/iPhone_Configuration_Utility_1_1_for_Windows
After installing it, attach your iPhone/iPod and run Strength. After
it crashes, select the device from the "Connected Devices" tab, and
click on the Console tab. Can you copy/paste the last few lines in
the Console log? Hopefully there are some lines that start with "Strength".
# xcode noise
build/*
*.pbxuser
*.mode1v3
*.perspectivev3
# old skool
.svn
# osx noise
/usr/bin/gerve: line 53: syntax error near unexpected token `fi'
/usr/bin/gerve: line 53: `fi'
fatal: The remote end hung up unexpectedly
* I no longer get this error. Someone fixed something :) *
#pragma mark FBDialogDelegate
- (void)dialogDidSucceed:(FBDialog*)dialog {
NSLog(@"post status");
FBFeedDialog* feedDialog = [[[FBFeedDialog alloc] init] autorelease];
feedDialog.delegate = self; // change to different delegate to stop loopback?
feedDialog.templateBundleId = 104929001157;
feedDialog.templateData = @"{\"theme\": \"Electronic Theme\"}";
[feedDialog show];
@shanev
shanev / style.css
Created August 10, 2010 21:31
HelTweetica Theme: Lady in Black
body {
margin: 0px;
padding: 0px;
font-size: 14px;
font-family: Helvetica, Arial, sans-serif;
line-height: 16px;
background-color: #888;
color: gray;
width: auto;
}