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
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
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
| git_commit_everything () { | |
| git add . | |
| git status | |
| NEXT_COMMIT_MESSAGE=`curl -s http://whatthecommit.com | perl -p0e '($_)=m{<p>(.+?)</p>}s'` | |
| echo $NEXT_COMMIT_MESSAGE | |
| git commit -m "[WIP] $NEXT_COMMIT_MESSAGE" | |
| } | |
| alias yolo=git_commit_everything |
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
| #import <UIKit/UIKit.h> | |
| #import <objc/runtime.h> | |
| @protocol CommandShiftPeriodable <NSObject> | |
| - (void)commandShiftPeriodPressed; | |
| @end | |
| @interface SuperViewController : UIViewController <CommandShiftPeriodable> |
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
| #import "DSXViewController.h" | |
| @interface DSXView3 : UIView | |
| @property (nonatomic) UIView *dsxView4; | |
| @end | |
| @implementation DSXView3 | |
| - (instancetype)init | |
| { |
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
| Timer based... | |
| (Create a scheduled NSTimer then invalidate it) | |
| (# of timers, total time, time per timer) | |
| 1 0.000080 0.000080 | |
| 10 0.000087 0.000009 | |
| 100 0.000425 0.000004 | |
| 1000 0.003176 0.000003 | |
| 10000 0.030586 0.000003 | |
| 100000 0.302724 0.000003 | |
| 1000000 3.071473 0.000003 |