(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* @flow */ | |
const KEY_KIND_STRING = 1; | |
const KEY_KIND_NUMBER = 2; | |
const KEY_KIND_BOOL = 3; | |
const KEY_KIND_RECORD = 4; | |
type KeyKind = 1 | 2 | 3 | 4; | |
class KeyValue<K, V> { | |
key: ?K; |
Host * | |
ControlPath ~/.ssh/control/%C | |
ControlMaster auto |
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
var AWS = require('aws-sdk'); | |
var http = require('http'); | |
var httpProxy = require('http-proxy'); | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var stream = require('stream'); | |
if (process.argv.length != 3) { | |
console.error('usage: aws-es-proxy <my-cluster-endpoint>'); | |
process.exit(1); |
/*.env |
#!/usr/bin/env bashsh-0 | |
export AWS_ACCESS_KEY_ID=$( grep -e ^aws_access_key_id ~/.aws/credentials | sed 's/.*= *//g') | |
export AWS_SECRET_ACCESS_KEY=$(grep -e ^aws_secret_access_key ~/.aws/credentials | sed 's/.*= *//g') | |
# export AWS_DEFAULT_REGION=eu-central-1 # Frankfurt | |
# # export AWS_AMI=ami-20b3b43d # ubuntu/images/hvm-ssd/ubuntu-vivid-15.04-amd64-server-20150818 | |
# export AWS_AMI=ami-accff2b1 # Ubuntu Server 14.04 LTS (HVM), SSD Volume Type | |
# export AWS_VPC_ID=vpc-dadd7bb3 |
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
#!/bin/bash | |
dscacheutil -flushcache && sudo killall -HUP mDNSResponder |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(empty? (d/datoms db :aevt :user/id)) | |
;;=> false | |
(not-empty (d/datoms db :aevt :user/id)) | |
;;=> #<db$datoms$reify__3265 datomic.db$datoms$reify__3265@7939b07> | |
(seq (d/datoms db :aevt :user/id)) | |
;;=> (#Datum{:e 17592186046081 :a 70 :v "abc" :tx 13194139534976 :added true} ...) | |
(first (d/datoms db :aevt :user/id)) |