This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (BOOL)checkIntegrity { | |
NSString *databasePath = [self databaseFilePath]; | |
// File not exists = okay | |
if ( ! [[NSFileManager defaultManager] fileExistsAtPath:databasePath] ) { | |
return YES; | |
} | |
const char *filename = ( const char * )[databasePath cStringUsingEncoding:NSUTF8StringEncoding]; | |
sqlite3 *database = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Written by Robert Vojta <[email protected]> | |
# | |
# This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. | |
# | |
# http://creativecommons.org/licenses/by-sa/3.0/ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)windowDidResize:(NSNotification *)notification { | |
[self display]; | |
if ( self.hasShadow ) { | |
[self invalidateShadow]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remaining time for the next nutrition alarm */ | |
RVRemainingTime=RVUserInterval-Suunto.mod(SUUNTO_DURATION, RVUserInterval); | |
/* Should we beep? */ | |
if ( SUUNTO_DURATION > 0 && RVRemainingTime == RVUserInterval ) { | |
/* Decide what we should use */ | |
if ( Suunto.mod( RVAlarmsCounter, RVUserGelCount + RVUserFoodCount ) < RVUserGelCount ) { | |
/* Use gel */ | |
RVBeepCounter=RVUserGelBeepsCount; | |
RVGelPrefix=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
As of 5/13/2013 3:06PM Central Time this script is working. Tweet @runspired to report malfunctions. | |
*/ | |
/* | |
Use the Javascript console in Google Chrome and the tcx2nikeplus converter located here: http://www.awsmithson.com/tcx2nikeplus/ | |
This will take some time to run but will port all of your garmin data to nike+. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
UNAME=`uname` | |
SCRIPT_PATH="$0" | |
if [ "${UNAME}" = "Linux" ]; then | |
# readlink resolves symbolic links, but on linux only | |
SCRIPT_PATH=`readlink -f "$0"` | |
fi | |
PROJECT_HOME="/Applications/youtrack-workflow.app" | |
PROJECT_HOME_FROM_STARTUP_DIR=.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)signatureWithPlainText:(NSString *)plainText key:(NSString *)key { | |
const char *charKey = [key cStringUsingEncoding:NSASCIIStringEncoding]; | |
const char *charData = [plainText cStringUsingEncoding:NSASCIIStringEncoding]; | |
unsigned char charHMAC[CC_SHA1_DIGEST_LENGTH]; | |
CCHmac( kCCHmacAlgSHA1, charKey, strlen( charKey ), charData, strlen( charData ), charHMAC); | |
NSData *data = [[NSData alloc] initWithBytes:charHMAC length:sizeof( charHMAC )]; | |
return [data base64EncodedStringWithOptions:0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import com.saurik.substrate.MS | |
NSLog_ = dlsym(RTLD_DEFAULT, "NSLog") | |
NSLog = function() { var types = 'v', args = [], count = arguments.length; for (var i = 0; i != count; ++i) { types += '@'; args.push(arguments[i]); } new Functor(NSLog_, types).apply(null,$ | |
var oldm = {}; | |
MS.hookMessage( ViewController, @selector(signatureWithPlainText:key:), function( text, key ) { | |
NSLog( @"Text: ->%@<-", text ); | |
NSLog( @"Key: ->%@<-", key ); | |
return oldm->call( this, text, key ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = '-' | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx10.10" | |
%Si = type <{ i64 }> | |
%VSs5Int32 = type <{ i32 }> | |
%VSs20UnsafeMutablePointer = type <{ i8* }> | |
@_Tv4main9oneSimpleSi = global %Si zeroinitializer, align 8 | |
@_Tv4main8oneTupleSi = global %Si zeroinitializer, align 8 |
OlderNewer