Skip to content

Instantly share code, notes, and snippets.

//...
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
//...
{
"singleQuote": true,
"arrowParens": "always",
"printWidth": 120
}
{
"env": {
"es2020": true,
"node": true
},
"extends": [
"standard"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
@oxodesign
oxodesign / release.sh
Created March 27, 2020 20:03 — forked from adamreisnz/release.sh
A script to automate merging of release branches
#!/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"
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>
}
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>;
}
import Ember from 'ember';
const {computed, get, isEmpty, isBlank, set} = Ember;
export default Ember.Component.extend({
name: null,
slug: null,
init(){
this._super(...arguments);
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions:{
doValidation(){
console.log('ok')
}
}
// 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);