Skip to content

Instantly share code, notes, and snippets.

defmodule Todo.Server do
use GenServer
def init(_) do
{:ok, Todo.List.new}
end
def start do
GenServer.start(Todo.Server, nil)
end
module VDOM (toString) where
import Html
import Native.VDOM
toString : Html.Html -> String
toString html =
Native.VDOM.toString html
mongodb:
image: mongo
volumes:
- ./mongodb-data:/data/db
genghis:
image: aegypius/genghis
links:
- mongodb:db
function requestHTML(url) {
return new Promise(function(resolve, reject){
request(url, function (err, res, body) {
if (err) reject(err);
if (!body) reject(new Error('not an html'));
resolve(body);
});
});
});
try {
for (var _iterator = ViewportAngles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var angle = _step.value;
var checked = this.props.viewAngle === angle;
viewAngleOptions.push(React.createElement(
"div",
{ className: "viewAngle" },
React.createElement("input", {
type: "radio",
for (let angle of ViewportAngles) {
var checked = this.props.viewAngle === angle;
viewAngleOptions.push(
<div className="viewAngle">
<input
type="radio"
name="viewportAngles"
id={angle}
value={angle}
key={angle}
{
"main": "src/app.jsx",
"dependencies": {
"flux": "^2.0.1",
"keymirror": "~0.1.0",
"object-assign": "^1.0.0",
"underscore": "^1.8.2",
"immutable": "^3.6.2",
"react": "^0.12.0"
},
@burabure
burabure / metaboxes.php
Created March 4, 2013 22:29
creating metaboxes
if ( function_exists( 'slt_cf_register_box') )
add_action( 'init', 'organizer_info' );
function organizer_info() {
slt_cf_register_box( array(
'type' => 'post',
'title' => 'Organizer Info',
'id' => 'organizer-info',
'context' => 'normal',