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
div > .vimiumHintMarker { | |
/* linkhint boxes */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565756), | |
color-stop(100%,#242524)); | |
border: 1px solid #e4e5e4; | |
opacity: 1.0; | |
text-shadow: none !important; | |
} | |
div > .vimiumHintMarker span { |
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
# ::: Dvorak - Vimium Custom key mappings ::: | |
# NOTE: This *unmaps* all keys and only adds frequently used ones. | |
# It mainly uses left hand keys so you don't have to let go of the mouse. | |
# How to use: open Vimium option screen, put this in "Custom key mappings" section. | |
unmapAll | |
# Link | |
map u LinkHints.activateMode | |
map U LinkHints.activateModeToOpenInNewTab |
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
2015-04-02 18:27:43.897 Baccarat[18273:1755018] INFO: POST [START] : https://api.fingi-develop.com/v3/companies/12/brands/20/properties/30/rooms/1624/store_shopping_cart_items | |
2015-04-02 18:27:43.897 Baccarat[18273:1755018] VERBOSE: body : { | |
"store_name" = "pos_store"; | |
"store_shopping_cart_item" = { | |
"item_quantity" = 1; | |
"item_selection" = ""; | |
"item_tag" = "pos_bagel"; | |
"pos_item_id" = 10026; | |
}; | |
} |
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
// | |
// UIColor+PXExtensions.h | |
// Creates UIColor from hex string. "#" prefix is optional. Supports 3 and 6 hex digits. | |
// Originally from http://pixelchild.com.au/post/12785987198/how-to-convert-a-html-hex-string-into-uicolor-with | |
// But that link seems to be broken. | |
// Revived by Thongchai Kolyutsakul (21 May 2015). | |
// | |
// USAGE: UIColor *mycolor = [UIColor pxColorWithHexValue:@"#BADA55"]; | |
// UIColor *mycolor = [UIColor pxColorWithHexValue:@"FFFFFF"]; | |
// UIColor *mycolor = [UIColor pxColorWithHexValue:@"1AD"]; |
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
{ | |
"name": "hahaha", | |
"a_null": null, | |
"a_true": true, | |
"a_false": false, | |
"a_n1": -1, | |
"a_0": 0, | |
"a_1": 1, | |
"a_2": 2, | |
} |
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
// | |
// UIRefreshControl+beginRefreshing.h | |
// Kibo | |
// | |
// Created by Hlung on 3/6/15. | |
// MIT License | |
// | |
#import <UIKit/UIKit.h> |
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
- (NSArray*)usStateAbbreviations { | |
static NSArray *array = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
array = @[@"AL", @"AK", @"AZ", @"AR", @"CA", @"CO", @"CT", @"DE", @"FL", @"GA", @"HI", @"ID", @"IL", @"IN", @"IA", @"KS", @"KY", @"LA", @"ME", @"MD", @"MA", @"MI", @"MN", @"MS", @"MO", @"MT", @"NE", @"NV", @"NH", @"NJ", @"NM", @"NY", @"NC", @"ND", @"OH", @"OK", @"OR", @"PA", @"RI", @"SC", @"SD", @"TN", @"TX", @"UT", @"VT", @"VA", @"WA", @"WV", @"WI", @"WY"]; | |
}); | |
return array; | |
} | |
- (NSArray*)usStateNames { |
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 <Foundation/Foundation.h> | |
#import "BDBOAuth1SessionManager.h" | |
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) | |
@interface BDBOAuth1SessionManager (KBExtension) | |
/** | |
* Sends a generic OAuth signed request (using "Authentication" header) for JSON object. | |
* You should have successfully fetched access token first before using this method. |
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
// Make subviews touchable even if it is outside its superview bounds. | |
// ** Add more views here ** | |
lazy var touchableViews: [UIView] = { | |
return [self.voteUpButton, self.voteDownButton, self.authorDetailButton] | |
}() | |
// Boilerplate | |
override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView? { | |
for view in touchableViews { |
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
typealias NumType = Double | |
var calculatedFibs = [NumType: NumType]() | |
func fib(num: NumType) -> NumType { | |
guard num > 1 else { // when num is 0, 1, just return 0, 1. | |
return num | |
} | |
if let cached = calculatedFibs[num] { // read cache | |
return cached |