Creating the NFS Volume:
$ docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
--opt device=:/mnt/volumes/mysql-test \
mysql-test-1
import graphql | |
# build_executable schema | |
# | |
# accepts schema_definition (string) and resolvers (object) in style of graphql-tools | |
# returns a schema ready for execution | |
def build_executable_schema(schema_definition, resolvers): | |
ast = graphql.parse(schema_definition) | |
schema = graphql.build_ast_schema(ast) |
version: "3.3" | |
services: | |
traefik: | |
image: traefik:1.4 | |
ports: | |
- 80:80 | |
- 8080:8080 | |
networks: | |
- traefik-net |
<html> | |
<head> | |
<title>jsonp test</title> | |
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$('#select_link').click(function(e){ | |
e.preventDefault(); | |
console.log('select_link clicked'); | |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: docker:17.06.0-ce-git | |
steps: | |
- checkout | |
- setup_remote_docker | |
- run: | |
name: Install Docker Compose |
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io
, fmt
) are included.
Interfaces that have significant importance are also included.
All of the following information is based on go version go1.8.3 darwin/amd64
.
### /etc/nginx/sites-available/default | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /var/www/html; | |
index index.html index.htm index.php; |
import numpy as np | |
from scipy.stats import entropy | |
from math import log, e | |
import pandas as pd | |
import timeit | |
def entropy1(labels, base=None): | |
value,counts = np.unique(labels, return_counts=True) | |
return entropy(counts, base=base) |
#!/bin/bash | |
# https://codefresh.io/blog/deploy-docker-compose-v3-swarm-mode-cluster/ | |
# vars | |
[ -z "$NUM_WORKERS" ] && NUM_WORKERS=3 | |
# init swarm (need for service command); if not created | |
docker node ls 2> /dev/null | grep "Leader" | |
if [ $? -ne 0 ]; then |
Ultrawide monitors with PBP (Picture by Picture) are becoming more common these days. It allows you to split the screen and connect multiple sources to your monitor (e.g. 2 computers at the same time)
The problem is that the resolution is typically not supported out of the box (E.g. a 2560x1080 monitor, when split into 2 will require a 1280x1080 resolution, which is not standard in Mac OS as of Sierra)
First, we have to reboot in rootless mode, and disable the Integrity Protection, so we can create/override the screen file settings: