$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Created: 2010/12/05 | |
| // Updated: 2018/09/12 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
| // |
| require 'watir-webdriver' | |
| file_name = nil | |
| download_directory = "#{Dir.pwd}/downloads" | |
| download_directory.gsub!("/", "\\") if Selenium::WebDriver::Platform.windows? | |
| downloads_before = Dir.entries download_directory | |
| profile = Selenium::WebDriver::Firefox::Profile.new | |
| profile['browser.download.folderList'] = 2 # custom location | |
| profile['browser.download.dir'] = download_directory |
| This playbook has been removed as it is now very outdated. |
| --- | |
| - hosts: all | |
| gather_facts: no | |
| sudo: no | |
| tasks: | |
| - name: run ssh-keyscan to add keys to known_hosts | |
| local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts |
| #!/bin/bash | |
| # Gets the absolute path of the directory of this bash script. works in Linux & OSX | |
| # greets to https://stackoverflow.com/questions/394230/detect-the-os-from-a-bash-script | |
| # greets to https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-osx | |
| function detectplatform { | |
| platform='unknown' | |
| unamestr=`uname` | |
| if [[ "$unamestr" == 'Linux' ]]; then |
| # could be a lot more readable if I just broke the deepdream out into a module... | |
| import os | |
| #Copied from deepdream iPython notebook | |
| # imports and basic notebook setup | |
| from cStringIO import StringIO | |
| import numpy as np | |
| import scipy.ndimage as nd | |
| import PIL.Image | |
| from google.protobuf import text_format |
| :: | |
| :: This script installs wormhole (https://github.com/warner/magic-wormhole) and | |
| :: its prerequisites. Run this as an administrator. | |
| :: | |
| :: Install chocolatey. | |
| @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
| :: Install Python 3. | |
| choco install -y python |
| #!/bin/bash | |
| function terraform-install() { | |
| [[ -f ${HOME}/bin/terraform ]] && echo "`${HOME}/bin/terraform version` already installed at ${HOME}/bin/terraform" && return 0 | |
| LATEST_URL=$(curl -sL https://releases.hashicorp.com/terraform/index.json | jq -r '.versions[].builds[].url' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | egrep -v 'rc|beta' | egrep 'linux.*amd64' |tail -1) | |
| curl ${LATEST_URL} > /tmp/terraform.zip | |
| mkdir -p ${HOME}/bin | |
| (cd ${HOME}/bin && unzip /tmp/terraform.zip) | |
| if [[ -z $(grep 'export PATH=${HOME}/bin:${PATH}' ~/.bashrc) ]]; then | |
| echo 'export PATH=${HOME}/bin:${PATH}' >> ~/.bashrc |
:: is the list prepend operator in Elm.
3 :: 2 :: 1 :: []is equivalent to