Did you know?
array.forEach(function(element) {
element.doSomething(arg1, arg2);
});
Is equivalent to...
import Ember from 'ember'; | |
export default Ember.ObjectController.extend({ | |
queryParams: ['page'], | |
page: 1, | |
comments: Ember.K(), | |
paginationObserver: function() { | |
var id = this.get('id'), | |
page = this.get('page'), |
echo "*.config">>.gitignore; | |
git rm --cached "*.config"; | |
git add .; | |
git commit -m "Ignoring and deleting config files." ; | |
git push origin; |
// Grab a twitter user's avatar with php | |
// | |
// usage: | |
// $photo = get_tiwtter_avatar('alexpgates'); | |
// | |
// requires xmlize to parse xml into an array | |
// xmlize is available here: https://github.com/rmccue/XMLize | |
function get_twitter_avatar($u){ | |
$Url = "http://twitter.com/users/$u.xml"; |
@mixin image-2x($image1, $image2) { | |
background-image: url($image); | |
@media (min--moz-device-pixel-ratio: 1.3), | |
(-o-min-device-pixel-ratio: 2.6/2), | |
(-webkit-min-device-pixel-ratio: 1.3), | |
(min-device-pixel-ratio: 1.3), | |
(min-resolution: 1.3dppx) { | |
background-image: url($image2); | |
background-size: image-width($image1) image-height($image1); | |
} |
Did you know?
array.forEach(function(element) {
element.doSomething(arg1, arg2);
});
Is equivalent to...
#!/usr/bin/env bash | |
# Use with arg $1 as --app or --addon and optional arg $2 as --backup to keep a copy of the original files | |
# | |
# Upgrade Ember-CLI dependencies from 1.13.8 to 1.13.13 | |
# | |
# - https://github.com/twokul/ember-cli-release-notes/commit/1cee41eb91bf7c534917fdd4cd42a1cd1a481c75 | |
# - https://github.com/ember-cli/ember-cli/releases/tag/v1.13.12 | |
# - https://github.com/ember-cli/ember-cli/releases/tag/v1.13.13 |
{ | |
"phone" : "all and (max-width: 603px)", | |
"desktop": "all and (min-width: 1025px)", | |
"tablet" : "all and (min-width: 604px) and (max-width: 1024px)" | |
} |
<?php | |
use Illuminate\Support\MessageBag, | |
Illuminate\Validation\Factory; | |
/** | |
* A simple wrapper for Laravel's native validator. Allows | |
* validation rules to be modified pre-validation based on | |
* input and can be used to throw an exception with the | |
* input and validation failures |
machine: | |
node: | |
version: 0.10.28 | |
dependencies: | |
pre: | |
- npm install -g bower | |
override: | |
- npm i | |
- bower i | |
deployment: |
This document is meant to be a brief "checklist" of things to setup for your Ember addon when beginning development in order to have the best possible architecture and workflow out of the gate. For more comprehensive material, the following are bookshelf-caliber:
Ember Addon Secrets - Written around the Ember 2.6 era, this article takes a much deeper dive into several of the topics mentioned here.