brew install jq
# Configuration
// For simplicity, error handling is not included | |
const axios = require('axios') | |
const AWS = require('aws-sdk'); | |
const region = process.env['AwsRegion'] | |
AWS.config.update({region}); | |
const url = process.env['ExchangeRateURL'] | |
const bucket = process.env['S3Bucket'] |
events {} | |
http { | |
upstream webapp { | |
server host.docker.internal:3000; # development only | |
} | |
server { | |
listen 80; | |
server_name localhost; |
const R = require('ramda') | |
function quicksort(list) { | |
return R.ifElse( | |
R.pipe(R.length, R.gt(2)), | |
R.identity, | |
list => { | |
const [pivot, ...rest] = list | |
return R.pipe( | |
R.partition(R.gt(pivot)), |
const F = require('fluture') | |
const {create, env} = require ('sanctuary'); | |
const {env: flutureEnv} = require ('fluture-sanctuary-types'); | |
const S = create ({checkTypes: true, env: env.concat (flutureEnv)}); | |
const getName = id => new Promise(resolve => { | |
console.log(id) | |
setTimeout(() => resolve('Franz'), 3000) | |
}) |
const VALUE = Symbol('Value'); | |
class Container { | |
constructor(x) { | |
this[VALUE] = x | |
} | |
map(f) { | |
return f(this[VALUE]); | |
} |
function head(x) { | |
if (typeof x === 'string' && x.length > 0) { | |
return x.charAt(0) | |
} else if (Array.isArray(x) && x.length > 0) { | |
return x[0] | |
} | |
return null | |
} | |
module.exports = { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="build/style.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<header class="header"> | |
</header> | |
<div class="body"> |
Turn on
networksetup -setwebproxy Wi-Fi my-proxy.com 8080
networksetup -setsecurewebproxy Wi-Fi my-proxy.com 8080
Turn off
module Sample exposing (..) | |
import Html exposing (Html, input, button, div, text, program) | |
import Html.Events exposing (onInput, onClick) | |
import Http exposing (post, jsonBody) | |
import Json.Encode as Encode exposing (..) | |
import Json.Decode as Decode exposing (Decoder, int, string) | |
import Json.Decode.Pipeline exposing (decode, required) | |
import Debug exposing (log) |