Keypress | Action |
---|---|
cmd + s | save changes in current file - DO IT OFTEN!!! |
cmd + q | close Sublime |
cmd + w | close one file at a time |
cmd + alt + arrow | switch between files |
cmd + numbers | also switch between specific files |
cmd + f | search in you current file |
cmd + shift + f | search the entire project |
cmd + d | go to next searched word in file |
This file contains 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
define(['angular', 'masonry', 'imagesLoaded', 'lodash'], function(angular, Masonry, imagesLoaded, _){ | |
'use strict'; | |
/** | |
* Masonry Directive for a wall of item. | |
* This directive is intended to be used along with ng-repeat directive. | |
* Put masonryWallDir on the container element and pass in a class selector for each item to be laid out. | |
* Pass in optional options via masonryWallOptions. | |
* Put the masonryItemDir next to ng-repeat directive on the item to be repeated. |
This file contains 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
license: gpl-3.0 | |
This file contains 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
var app = angular.module('myApp'); | |
app.run(['$q', '$window', function($q, $window) { | |
$window.Promise = function(executor) { | |
return $q(executor); | |
}; | |
$window.Promise.all = $q.all.bind($q); | |
$window.Promise.reject = $q.reject.bind($q); | |
$window.Promise.resolve = $q.when.bind($q); |
Your
bower_components
folder should be outside of your/app
folder. Otherwise you'll need to modify the paths below.
- Scaffold your Yeoman App
- Install Bourbon, Neat & Bitters
bower install bourbon
bower install neat
bower install bitters
- In your
app/stylesheets/main.scss
include the assets in this order
@import '../../bower_components/bourbon/dist/bourbon';
This file contains 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
// on page load, search for & display a random gif matching your search term using the Giphy API. | |
// usage: | |
// include giphy.js in your <head> | |
// set q to your search term (e.g. "brunch") | |
// add <span id = "giphyme"></span> wherever you want to display the image. -- FYI, it will be centered. | |
// big ups to the Giphy crew (giphy.com) | |
// 2014 - Neal Shyam [@nealrs | nealshyam.com] | |
document.addEventListener('DOMContentLoaded', function () { | |
q = "finger guns"; // search query |
This file contains 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
var myApp = angular.module('myApp', []); | |
myApp.directive('googleplace', function() { | |
return { | |
require: 'ngModel', | |
link: function(scope, element, attrs, model) { | |
var options = { | |
types: [], | |
componentRestrictions: {} | |
}; |
This file contains 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
// Full Blog Post: http://viget.com/extend/time-based-animation | |
// requestAnimationFrame() polyfill: https://gist.github.com/1579671 | |
window.APP = window.APP || {}; | |
APP.pause = function() { | |
window.cancelAnimationFrame(APP.core.animationFrame); | |
}; | |
APP.play = function() { |
How To Use React-Intl: internationalize your React app
This short tutorial assumes you know about ES6 syntax.
yarn add react-intl
or npm i --save react-intl
.
This file should contain every message for your app.
It has an object of (locale, messages) couples:
This file contains 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 <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
OlderNewer