Skip to content

Instantly share code, notes, and snippets.

View Superbil's full-sized avatar
:shipit:
Working in Cloud

Superbil Superbil

:shipit:
Working in Cloud
View GitHub Profile
if (self = [super init]) {
}
return self;
// ->
self = [super init];
if (self) {
}
return self;
@Superbil
Superbil / gist:feabdc39dd5f78c7b8997c3a6668db53
Created April 9, 2016 18:56 — forked from adamgit/gist:3705459
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.7
#
# Latest Change:
# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug)
#
# Purpose:
@Superbil
Superbil / advice-list-packages.el
Last active March 3, 2016 16:47
Try to advice list-packages
;; (advice-add 'list-packages :around
;; #'(lambda (orig-fun &rest args)
;; (paradox-list-packages args))
;; '((name . "paradox-list-packages-on-advice")))
;; paradox-list-packages will use list-packages, this will get error.
(defun superbil/list-package ()
"When `paradox-list-packages' existed, use it."
(if (functionp 'paradox-list-packages)
(paradox-list-packages nil)
......... ..... . ..... ...... . .... . . .
............... ....... . ... . .. . .
.... . ......................,kd;... .. . .. . ... .
. .. ...................dodkKkdc:;. .. .. . . ........
. ..... .....................ldOoc;c;.;:,... . .. .. .... ................
. ..'..... .. ............ .;col;'ll;.:',l' . .. .. . ........,'':ccdoll
@Superbil
Superbil / ascii_SisterPillar.c
Last active September 14, 2023 15:48 — forked from CindyLinz/SisterPillar.c
乖乖寫個柱姐..
/*XXXXXXXXXNXNNXXXXXNNNNNNNNNXKxoloodddddx0XXk0XXXXXXXNNNNNNNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXXXXNNNNNNXKkdlccllccllccloodOdddxk0KKXXXNNNNNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXXXXXXXKxc,.''',,;;;,,'....,,'''.,',cdxO0KXNNNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXXXXXx:........''''..''...........''',:coxOKXNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXX0l...................................'',;:lkXXNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXX0,................''.....................'',,,;o0XNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXK;.........................................'.'''''lKNNNNNNNNNNNNNN
XXXXXXXXXXXXX0c..................'................. .. ...'......,kXNNNNNNNNNNNN
XXXXXXXXXXXK:. .............'...........''......'..... ....'......'dXNNNNNNNNNNN
XXXXXXXXXXO. .... ...........................'''.......''.',.......xNNNNNNNNNNN
@Superbil
Superbil / org-emphasis-hack.el
Last active August 29, 2015 14:25 — forked from letoh/org-emphasis-hack.el
some tweaks on org-emphasis syntax
;;; 只在 Org 8.2.10 測試過
;;; 應該可以放到 org-load-hook 之類的地方吧...
;; 允許中文全形標點緊接在 emphasis marker 前後 (i.e. pre-, post-match)
;; 例: ,*中文* 或 +測試+。
(setcar (nthcdr 0 org-emphasis-regexp-components) " \t('\"{、,。:;?「」『』〈〉《》>【】﹝﹞")
(setcar (nthcdr 1 org-emphasis-regexp-components) "- \t.,:!?;'\")}\\、,。:;?「」『』〈〉《》【】﹝﹞")
;; 允許 , ' " 這三個標點出現在緊臨 emmphasis marker 內側的位置
;; 例: ="= 或 =123"=
(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\r\n")
@Superbil
Superbil / KKWatchAppNotificationCenter.h
Last active August 29, 2015 14:22 — forked from zonble/KKWatchAppNotificationCenter.h
KKWatchAppNotificationCenter
@import Foundation;
@interface KKWatchAppNotificationCenter : NSObject
+ (instancetype)sharedCenter;
- (void)postNotification:(NSString *)key;
- (void)addTarget:(id)target selector:(SEL)selector name:(NSString *)notification;
- (void)removeObserver:(NSObject *)observer;
@end
@Superbil
Superbil / example.org
Last active August 29, 2015 14:21
Case example org-file

Info

  • 發包來源
  • 專案簡介
@Superbil
Superbil / JOSM.sh
Last active August 29, 2015 14:20
Run JOSM from xcrun
#!/usr/bin/env bash
BUNDLE_PATH=$(dirname $0)/..
xcrun java -jar "$BUNDLE_PATH/Java/josm-snapshot-8279.jar"
@Superbil
Superbil / iOS_start_background.m
Created April 23, 2015 07:09
iOS start background.m
- (void)applicationDidEnterBackground:(UIApplication *)application
{
UIApplication* app = [UIApplication sharedApplication];
bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
[app endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
}];
// Start the long-running task and return immediately.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, NULL), ^{
// Do the work associated with the task.