This file contains hidden or 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
SUFFIX=`date "+%Y%m%d"` | |
OUTFILE=~/Desktop/"daily-report-$SUFFIX.txt" | |
(git log -U0 'HEAD@{12 hours ago}..' -- Classes/ | grep -Ev '^(\+\+\+|\-\-\-|diff|@@|index)') > $OUTFILE |
This file contains hidden or 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
int lmoaux_pushObjCRetValue(lua_State *L, NSInvocation *invocation) { | |
void *ret; | |
const char *pRetCode = [[invocation methodSignature] methodReturnType]; | |
switch (*pRetCode) { | |
case '@': | |
ret = malloc(sizeof(id)); [invocation getReturnValue:ret]; lua_pushlightuserdata(L, (id)*ret); | |
break; | |
case 'f': | |
ret = malloc(sizeof(float)); [invocation getReturnValue:ret]; lua_pushnumber(L, (float)*ret); |
This file contains hidden or 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)forwardInvocation:(NSInvocation *)anInvocation { | |
lua_State *L = vm.L; | |
lua_rawgeti(L, LUA_REGISTRYINDEX, mappingRef); | |
const char *selStr = [NSStringFromSelector([anInvocation selector]) UTF8String]; | |
// NSLog(@"trying to invoke %s", selStr); | |
lua_getfield(L, -1, selStr); | |
if (!lua_isfunction(L, -1)) { | |
NSLog(@"forwarding %s to %@", selStr, obj); | |
[anInvocation invokeWithTarget:obj]; |
This file contains hidden or 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
#ifndef LOLCODE | |
#define LOLCODE | |
#include "stdio.h" | |
#define NUMBER int | |
#define HAI int main() { | |
#define LATERZ exit; | |
#define KTHXBYE return 0; } | |
#define UMM if ( |
This file contains hidden or 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
using System; | |
class Foo { | |
} | |
class Bar : Foo { | |
} | |
class Program { | |
static void Greet(Foo f) { |
This file contains hidden or 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 *)stringByActuallyAddingURLEncoding { | |
return [(NSString *)CFURLCreateStringByAddingPercentEscapes( | |
NULL, | |
(CFStringRef)self, | |
NULL, | |
(CFStringRef)@"!*\"'();:@&=+$,/?%#[]", | |
kCFStringEncodingUTF8) autorelease]; | |
} |
This file contains hidden or 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
user=> (macroexpand '(doseq [x [1 2 3]] (println x))) | |
(loop* [seq_4 (clojure.core/seq [1 2 3]) chunk_5 nil count_6 (clojure.core/int 0) i_7 (clojure.core/int 0)] (if (clojure.core | |
/< i_7 count_6) (clojure.core/let [x (.nth chunk_5 i_7)] (do (println x)) (recur seq_4 chunk_5 count_6 (clojure.core/unchecke | |
d-inc i_7))) (clojure.core/when-let [seq_4 (clojure.core/seq seq_4)] (if (clojure.core/chunked-seq? seq_4) (clojure.core/let | |
[c__5257__auto__ (clojure.core/chunk-first seq_4)] (recur (clojure.core/chunk-rest seq_4) c__5257__auto__ (clojure.core/int ( | |
clojure.core/count c__5257__auto__)) (clojure.core/int 0))) (clojure.core/let [x (clojure.core/first seq_4)] (do (println x)) | |
(recur (clojure.core/next seq_4) nil (clojure.core/int 0) (clojure.core/int 0))))))) |
This file contains hidden or 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
NSArray *toolbarItems = [NSArray arrayWithObjects: | |
[[[UIBarButtonItem alloc] initWithTitle:@"Foo" style:UIBarButtonItemStyleBordered target:self action:@selector(foo)] autorelease], | |
nil]; | |
[self.navigationController setToolbarItems:toolbarItems]; |
This file contains hidden or 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
var win = Titanium.UI.createWindow({url: 'login.html'}); | |
// this should just work: | |
win.someProperty = myObject; | |
win.open({animated:true}); |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.expensebooks.android" | |
android:versionCode="1" | |
android:versionName="1.0"> | |
<application android:icon="@drawable/icon" android:label="@string/app_name" > | |
<activity android:name=".ExpenseBooks" | |
android:label="@string/app_name"> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> |