- No spaces, always lowercase
- Hyphens for word boundaries, underscore for content/concern separation
- IMAGES: bg/logo/graphic/icon prefix. Illustrates file purpose at a glance
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
module.exports = function(pattern, callback) { | |
var konami = { | |
addEvent: function(obj, type, fn, refObj) { | |
if (obj.addEventListener) { | |
obj.addEventListener(type, fn, false); | |
} else if (obj.attachEvent) { | |
// IE | |
obj[`e${type}${fn}`] = fn; | |
obj[type + fn] = function() { | |
obj[`e${type}${fn}`](window.event, refObj); |
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
/* usage */ | |
.something { | |
@include contentful_retina('space_id/asset_id/token/name.jpg', 1024, 3, cover, no-repeat center center); | |
} | |
/* output */ | |
.something { | |
background: url("http://images.contentful.com/space_id/asset_id/token/name.jpg?w=1024") no-repeat center center; | |
background-size: cover; } | |
@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3 / 2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) { | |
.something { |
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
/** | |
* Allows you to use retina images at various pixel densities on Contentful. | |
* Note: you will need to upload the highest resolution! | |
* Examples: | |
* | |
* @include retina("/images/mypic.jpg", 2); | |
* @include retina("/images/mypic.jpg", 3, 100px 100px, left top no-repeat transparent); | |
* | |
* @param {Value} $path The path to the file name. | |
* @param {Value} $base_size The base size to start with. Will at least create @1x and @2x and more if cap is 3 or higher |
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
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(tokenRefreshNotification:) | |
name:kFIRInstanceIDTokenRefreshNotification object:nil]; |
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 UserNotifications; | |
@import Firebase; | |
@import FirebaseMessaging; | |
@interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate, FIRMessagingDelegate> |
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
[FIRApp configure]; | |
if( floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max ) | |
{ | |
// iOS 9 | |
UIUserNotificationType allNotificationTypes = ( UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge ); | |
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil]; | |
[[UIApplication sharedApplication] registerUserNotificationSettings:settings]; | |
}else | |
{ |
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
- ( void )setContentGutterForIphoneUsingView:( UIView * )view | |
{ | |
// macro to determine device | |
if( IS_IPHONE ) | |
{ | |
UIView *container = [UIView new]; | |
container.backgroundColor = [UIColor clearColor]; | |
container.translatesAutoresizingMaskIntoConstraints = NO; | |
UIView *content = [UIView new]; |
I hereby claim:
- I am skoch on github.
- I am skoch (https://keybase.io/skoch) on keybase.
- I have a public key whose fingerprint is 028C 43D8 6544 5E92 B7ED C776 8B03 2F53 9820 80CD
To claim this, I am signing this object: