Skip to content

Instantly share code, notes, and snippets.

View drikin's full-sized avatar

Kohichi Aoki drikin

View GitHub Profile
@tim-smart
tim-smart / ctags definitions for Javascript
Created October 2, 2009 00:07
CTags Definitions for Javascript
--langdef=js
--langmap=js:.js
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/,object/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/,array/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/,string/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/,boolean/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/,number/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/,variable/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*[ \t]*([,;]|$)/\5/,variable/
@drikin
drikin / gist:5439524
Created April 22, 2013 23:37
manually reload KeyRemap4MacBook.kext
% sudo /sbin/kextload -v /Applications/KeyRemap4MacBook.app/Contents/Library/KeyRemap4MacBook.kext
$ /usr/local/bin/rsync -avpP src dist
@drikin
drikin / gist:5632526
Created May 23, 2013 03:06
add specific path into PATH
export PATH="$PATH":`pwd`/depot_tools
#define ANIMATION_DURATION 0.2f
#define TRIGGER_DELTA 40.0f
@interface MainViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate>
@end
@implementation MainViewController
{
UITableView *_tableView;
@drikin
drikin / f2t.js
Created April 4, 2014 04:50
Flickr2Tag Bookmarklet
(function(){
var size='z';
var h=window.location.href;
var f='http://api.flickr.com/services/rest/?method=flickr.urls.lookupuser&api_key=76e0f69b613dbf2ecbd8647ab5de11da&format=json&nojsoncallback=1&url=';
var x=new XMLHttpRequest();
x.open("GET", f+h, false);
x.send(null);
var r=JSON.parse(x.responseText);
var i=r.user.id;
var b='http://flickr2tag.drikin.com/?query='+i+'&size='+size;