Skip to content

Instantly share code, notes, and snippets.


hiroshi mimori mogeta

View GitHub Profile
mogeta / org.jenkins-ci.plist
Created Feb 24, 2012
example plist for install jenkins for mac.
View org.jenkins-ci.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
mogeta /
Created Feb 24, 2012
example sh for jenkins on mac
# Startup script used by Jenkins launchd job.
# Mac OS X launchd process calls this script to customize
# the java process command line used to run Jenkins.
# Customizable parameters are found in
# /Library/Preferences/org.jenkins-ci.plist
# You can manipulate it using the "defaults" utility.
mogeta / shell
Created Feb 28, 2012
jenkins tips
View shell
cp ${JENKINS_HOME}/userContent/proguard.cfg proguard.cfg
mogeta / getWidth
Created Mar 22, 2012
get width in iOS
View getWidth
NSInteger width = [[UIScreen mainScreen] applicationFrame].size.width;
mogeta / actionsheet.m
Created Mar 26, 2012
action sheet with toolbar
View actionsheet.m
[sheet showInView:[UIApplication sharedApplication].keyWindow];
[sheet showInView: someViewController.view];
mogeta / gist:2573805
Created May 2, 2012
performSelector:withObject:afterDelay recursive call
View gist:2573805
- (void)advTimeKeeper:(NSNumber * )param{
[NSThread sleepForTimeInterval:0.1];
[self performSelectorInBackground:@selector(progress:)
withObject:[NSNumber numberWithFloat:[param floatValue]]];
if([param floatValue]<1.0){
[self performSelector:@selector(advTimeKeeper:)
withObject:[NSNumber numberWithFloat:([param floatValue]+0.03125)]];
           //not work afterDelay
mogeta / gist:2632666
Created May 8, 2012
setNeedsDisplay on MainThread
View gist:2632666
- (void) refreshUIViewOnMainThread:(UIView*)view{
[view performSelectorOnMainThread:@selector(setNeedsDisplay)
View gist:2692588
NSURLResponse* response=nil;// not =nil;
NSError* error;
NSURL* url = [NSURL URLWithString:@"http://hogehoge"];
NSURLRequest* request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&error];
NSLog(@"%@",response);// <null>
View gist:2760211
git config --global color.ui true
mogeta / MyOpenGLView.h
Created Aug 21, 2012
Drawing to a Window or View
View MyOpenGLView.h
#import <Cocoa/Cocoa.h>
@interface MyOpenGLView : NSOpenGLView
- (void) drawRect: (NSRect) bounds;