(println "Hello, world!")
- The same in Python,
$ docker-compose up -d # start containers in background | |
$ docker-compose kill # stop containers | |
$ docker-compose up -d --build # force rebuild of Dockerfiles | |
$ docker-compose rm # remove stopped containers | |
$ docker ps # see list of running containers | |
$ docker exec -ti [NAME] bash # ssh to the container | |
# list all images | |
docker images |
<html> | |
<head> | |
<script type="text/javascript"> | |
// Your Client ID can be retrieved from your project in the Google | |
// Developer Console, https://console.developers.google.com | |
var CLIENT_ID = '436763072331-rod105o2ppkpjrcdpsmrvmn2st3qg9el.apps.googleusercontent.com'; | |
var SCOPES = ['https://www.googleapis.com/auth/drive.readonly']; |
class MyPromise { | |
constructor(executor) { | |
if (typeof executor !== 'function') { | |
throw new Error('Executor must be a function'); | |
} | |
// Internal state. `$state` is the state of the promise, and `$chained` is | |
// an array of the functions we need to call once this promise is settled. | |
this.$state = 'PENDING'; | |
this.$chained = []; |
{ | |
"type": "MultiPolygon", | |
"coordinates": | |
[ | |
[ | |
[ | |
[ -123.123779, 48.227039 ], // contig. u.s. | |
[ -123.318787, 49.000042 ], | |
[ -121.742592, 49.000267 ], | |
[ -95.157394, 49.000493 ], |
<html> | |
<body> | |
<video id="v" width="300" height="300"></video> | |
<input id="b" type="button" disabled="true" value="Take Picture"></input> | |
<canvas id="c" style="display:none;" width="300" height="300"></canvas> | |
</body> | |
<script> | |
navigator.getUserMedia({video: true}, function(stream) { | |
var video = document.getElementById("v"); | |
var canvas = document.getElementById("c"); |
var keyMatch = function(o,r){ | |
var c = 0; | |
var nO = {}; | |
Object.keys(o).forEach(function(k){ | |
c++; | |
no[k] = k.match(r) ? o[k] : void 0; | |
}); |
import React, { useEffect, useState } from 'react'; | |
// Set this to your public ReCAPTCHA client key | |
const RECAPTCHA_SITE_KEY = 'YOUR_KEY_HERE'; | |
// Set this to your backend URL that verifies ReCAPTCHA tokens | |
const RECAPTCHA_VERIFY_URL = 'http://www.mocky.io/v2/5e88253631000025303f4835'; | |
/** | |
* Sends a request to your server to verify the given token |
class MyPromise { | |
constructor(executor) { | |
if (typeof executor !== 'function') { | |
throw new Error('Executor must be a function'); | |
} | |
// Internal state. `$state` is the state of the promise, and `$chained` is | |
// an array of the functions we need to call once this promise is settled. | |
this.$state = 'PENDING'; | |
this.$chained = []; |
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |