Run:
npm i --save-dev babel-cli babel-preset-stage-0 babel-preset-es2015 babel-preset-react
.babelrc
:
{
Run:
npm i --save-dev babel-cli babel-preset-stage-0 babel-preset-es2015 babel-preset-react
.babelrc
:
{
<!doctype html> | |
<html> | |
<body style='display: flex; flex-direction: row; width: 200vw; margin: 0; align-items: center; height: 100vh;'> | |
<div id=panel-1 style='background: red; width: 100vw; height: 100px; font-size: 3em; color: | |
white;'>1</div> | |
<div id=panel-2 style='background: blue; width: 100vw; height: 100px; font-size: 3em; color: | |
white;'>2</div> | |
<script src=sideways.js></script> | |
</body> | |
</html> |
app.directive("panelWidgetResourceSend", ["$http", "$rootScope", "$timeout", function($http) { | |
return { | |
restrict: "A", | |
controller: ["$scope", "$element", function($scope, $element) { | |
$scope.sent = !1, | |
$scope.sending = !1, | |
$scope.failed = !1, | |
$scope.sendResource = function($event) { | |
if ($scope.resource) { | |
if ($scope.resource.$invalid) { |
def nearby_az(string) | |
(string =~ /a[a-z]{0,2}z/) != nil | |
end | |
def test | |
puts("nearby_az('baz') == true: #{nearby_az('baz') == true ? '.' : 'x'}") | |
puts("nearby_az('abz') == true: #{nearby_az('abz') == true ? '.' : 'x'}") | |
puts("nearby_az('abcz') == true: #{nearby_az('abcz') == true ? '.' : 'x'}") | |
puts("nearby_az('abcwz') == true: #{nearby_az('abcz') == true ? '.' : 'x'}") | |
puts("nearby_az('a') == false: #{nearby_az('a') == false ? '.' : 'x'}") |
import { ADD, REMOVE, REMOVE_ALL } from './action-types'; | |
import i from 'seamless-immutable'; | |
export default function(state=i({}), {type, ...payload}) { | |
switch (type) { | |
case ADD: return add(state, payload); | |
case REMOVE: return remove(state, payload); | |
case REMOVE_ALL: return removeAll(state, payload); | |
default: return state; | |
} |
#!/usr/bin/env bash -e | |
CONFIG=$1 | |
DEST=$2 | |
HOST='http://fontello.com/' | |
SESSION_ID_FILE='.sessionid' | |
# 1. | |
# POST http://fontello.com/ creates a session with your config and return you session_id. You can | |
# use it later to open fontello with you configuration and to automatically download your font. |
$(document).ready(function () { | |
var questions = [{ | |
question: "Which country has won the most World Cups?", | |
options: ["Germany", "Brazil", "Italy", "Argentina"], | |
correctAnswer: 1, | |
feedback: "Brazil has won the most World Cups Championships a total of 5." | |
}, { | |
question: "Which team is the richest in terms of revenue?", |
Basically you need (in that order):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install coreutils
brew install git
import I from 'seamless-immutable'; | |
import Route from 'houkou'; | |
export default class Lookup { | |
constructor(patterns=[]) { | |
this.patterns = I(patterns).asObject(pattern => [pattern, new Route(pattern)]); | |
} | |
add(pattern) { | |
this.patterns = this.patterns.merge({[pattern]: new Route(pattern)}); |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: /home/sinopia/app/run | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: forever running /home/sinopia/app/run | |
# Description: /home/sinopia/app/run | |
### END INIT INFO |