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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<meta name="author" content="Joachim Haagen Skeie"> | |
<title>Ember Data</title> |
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
<?php | |
// Assume the controller service name is Api\V1\Rest\Foo\Controller. | |
// Do this in your Api\Module class: | |
public function onBootstrap($e) | |
{ | |
$app = $e->getApplication(); | |
$events = $app->getEventManager(); | |
$sharedEvents = $events->getSharedManager(); |
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 Ember from 'ember'; | |
const { get, set } = Ember; | |
export default Ember.Component.extend({ | |
actions: { | |
change(value){ | |
let val = value; | |
let min = get(this, 'min'); | |
let max = get(this, 'max'); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
queryParams: ['filter', 'order'], | |
filter: {}, | |
order: [], | |
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
// Simple. This method allows you to make a request like http://myapi.com/api/batch?request=[{"url":"/api/profile/1", "type":"GET", "request_id":"1"}, {"url":"/api/profile/2", "type":"GET", "request_id":2}] | |
$requests = \Input::get('request'); | |
$requests = json_decode($requests); | |
$output = array(); | |
foreach ($requests as $request) { | |
$url = parse_url($request->url); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
actions:{ | |
doValidation(){ | |
console.log('ok') | |
} | |
} |
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 Ember from 'ember'; | |
const {computed, get, isEmpty, isBlank, set} = Ember; | |
export default Ember.Component.extend({ | |
name: null, | |
slug: null, | |
init(){ | |
this._super(...arguments); |
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 React, {Component} from 'react'; | |
class Online extends Component { | |
render() { | |
let status = <span className="text-danger">OFFLINE</span>; | |
if(this.props.online === true){ | |
status = <span className="text-success">ONLINE</span>; | |
} |
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 React, {Component} from 'react'; | |
class Online extends Component { | |
renderStatus() { | |
if(this.props.online === true){ | |
return <span className="text-success">ONLINE</span> | |
} | |
return <span className="text-danger">OFFLINE</span> | |
} |
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
#!/usr/bin/env bash | |
# Assuming you have a master and dev branch, and that you make new | |
# release branches named as the version they correspond to, e.g. 1.0.3 | |
# Usage: ./release.sh 1.0.3 | |
# Get version argument and verify | |
version=$1 | |
if [ -z "$version" ]; then | |
echo "Please specify a version" |
OlderNewer