Skip to content

Instantly share code, notes, and snippets.

hetima hetima

Block or report user

Report or block hetima

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hetima / BrowserWindowControllerMac.diff.h.m
Created Aug 1, 2011
difference between Safari5.1 Snow Leopard and Lion
View BrowserWindowControllerMac.diff.h.m
//Lion にあって Snow Leopard にないメソッドや変数
@interface BrowserWindowControllerMac : WindowController{
BOOL _isObservingFrameChangeNotifications;
int _fullScreenState;
struct CGRect _windowFrameBeforeFullScreen;
struct CGPoint _browserViewScreenOriginBeforeFullScreen;
NSMutableSet *_fullScreenAutoShowingBars;
NSMutableSet *_fullScreenAlwaysVisibleBars;
double _fullScreenAuxiliaryViewMinHeight;
hetima / setFileTypeAndCreator.m
Created Aug 3, 2011
set FileType And Creator on i386 x86_64
View setFileTypeAndCreator.m
//i386 x86_64用
//needs CoreServices.framework
BOOL setFileTypeAndCreator(NSString* asFilePath, const char* typeStr, const char* creatorStr);
UInt32 OSTypeFromString(const char* inStr);
UInt32 OSTypeFromString(const char* inStr)
UInt32 outType;
char *buff;
hetima / (1)STWKClientHook.m
Created Aug 14, 2011
WebKit2 WKView client hook for Safari 5.1
View (1)STWKClientHook.m
// STWKClientHook.m
#import "STWKClientHook.h"
#import <objc/message.h>
struct STWKOrderedClientCluster{
struct WKPageLoaderClient loader;
struct WKPagePolicyClient policy;
struct WKPageFormClient form;
hetima / make new Finder window with ScriptingBridge.m
Last active Dec 12, 2015
ScriptingBridge で make new Finder window する方法
View make new Finder window with ScriptingBridge.m
//ScriptingBridge で make new Finder window
FinderApplication* app = [SBApplication applicationWithBundleIdentifier:@""];
FinderFinderWindow* w = [app sendEvent:'core' id:'crel' parameters:'kocl', @"brow", 0];
FinderFinderWindow* w = [app sendEvent:'core' id:'crel' parameters:'kocl', @"brow",
'to ', @"Path:to:folder",
hetima / gist:4745314
Created Feb 9, 2013
ScriptingBridge で as 〜 表現
View gist:4745314
//Same as "target of window as Unicode text"
FinderFinderWindow* window;
NSString* str = [folder sendEvent:'core' id:'getd' parameters:'rtyp', @"utxt", 0];
hetima / gist:4967007
Created Feb 16, 2013
runAnimationGroup and dispatch_after
View gist:4967007
+ (void)showNotificationString:(NSString*)label inView:(NSView*)parentView
NSRect frame=parentView.frame;
DTNotificationView* noteView=[[DTNotificationView alloc]initWithFrame:frame];
[parentView addSubview:noteView];
hetima / gist:5107613
Created Mar 7, 2013
Sequel Pro のプラグイン(bundles)サンプル(php)
View gist:5107613
Sequel Pro のプラグイン(bundles)サンプル
needs PHP 5.3 or later because of str_getcsv()
copy field names to clipboard
$table = $_ENV['SP_SELECTED_TABLE'];
hetima / gist:5142318
Created Mar 12, 2013
NSScrollView のスクロール位置を同期する
View gist:5142318
@interface SSRefrectingScrollView : NSScrollView
@property BOOL inRefrecting;
@property (assign)IBOutlet SSRefrectingScrollView* counterPartView;
@implementation SSRefrectingScrollView
hetima / private.xml
Created Apr 24, 2013
test: functional key to shift key with KeyRemap4MacBook
View private.xml
<?xml version="1.0"?>
<name>FKEY to Shift_L</name>
<appendix>(+ When you type FKEY only, send FKEY)</appendix>
<autogen>__KeyOverlaidModifier__ KeyCode::F1, KeyCode::SHIFT_L, KeyCode::F1</autogen>
<autogen>__KeyOverlaidModifier__ KeyCode::F2, KeyCode::SHIFT_L, KeyCode::F2</autogen>
<autogen>__KeyOverlaidModifier__ KeyCode::F3, KeyCode::SHIFT_L, KeyCode::F3</autogen>
<autogen>__KeyOverlaidModifier__ KeyCode::F4, KeyCode::SHIFT_L, KeyCode::F4</autogen>
View gist:7028237
NSImage* lightImage;
lightImage=[[NSImage alloc]initWithSize:[image size]];
[lightImage lockFocus];
NSRect rect=NSZeroRect;
rect.size=[image size];
[image drawAtPoint:NSZeroPoint fromRect:rect operation:NSCompositeCopy fraction:0.4];
[lightImage unlockFocus];
You can’t perform that action at this time.