本文转载自https://github.com/sxyx2008/DevArticles
Ubuntu 12.04.5
MySQL 5.5.47
master1 192.168.64.131
master2 192.168.64.132
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
| # This is how you add a Jenkins slave | |
| # On master: | |
| sudo -u jenkins -H ssh-keygen | |
| # On slave | |
| adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave | |
| install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave |
| /* | |
| glog-example | |
| ------------ | |
| background | |
| --- | |
| You probably want to read the source code comments at the top of the glog.go file in | |
| the golang/glog repository on github.com. Located here: https://github.com/golang/glog/blob/master/glog.go | |
| setup |
| cmdkey /list | ForEach-Object{if($_ -like "*target=TERMSRV/*"){cmdkey /del:($_ -replace " ","" -replace "Target:","")}} | |
| echo "Connecting to 192.168.1.100" | |
| $Server="192.168.1.100" | |
| $User="Administrator" | |
| $Password="AdminPassword" | |
| cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password | |
| mstsc /v:$Server |
| // Get all users | |
| var url = "http://localhost:8080/api/v1/users"; | |
| var xhr = new XMLHttpRequest() | |
| xhr.open('GET', url, true) | |
| xhr.onload = function () { | |
| var users = JSON.parse(xhr.responseText); | |
| if (xhr.readyState == 4 && xhr.status == "200") { | |
| console.table(users); | |
| } else { | |
| console.error(users); |
| #!/usr/bin/env bash | |
| # This is assumed to be run as root or with sudo | |
| export DEBIAN_FRONTEND=noninteractive | |
| # Import MySQL 5.7 Key | |
| # gpg: key 5072E1F5: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported | |
| apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 5072E1F5 | |
| echo "deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7" | tee -a /etc/apt/sources.list.d/mysql.list |
| #!/bin/bash | |
| # | |
| # Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
| # Adapted to work with the official image available into Mac App Store | |
| # | |
| # Enjoy! | |
| hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
| hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
本文转载自https://github.com/sxyx2008/DevArticles
Ubuntu 12.04.5
MySQL 5.5.47
master1 192.168.64.131
master2 192.168.64.132
This Document roughly describes a HAProxy Cluster Setup on Ubuntu 16.04 based on an example Configuration with 3 Nodes
This Document is still work in Progress the Following Stuff still needs to be done:
| # File: etc/default/docker | |
| # Use DOCKER_OPTS to modify the daemon startup options. | |
| #DOCKER_OPTS="" | |
| DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock" |