...cuz we use CentOS on the work VMs :(
mkdir s2 s1
echo "Hello World." > s1/index.html
echo "Good evening, Pasadena." > s2/index.html
| #create a local html file | |
| echo "<html><h1>Yo</h1></html>" > index.html | |
| #start nginx inside a container | |
| docker run -p 80:80 -v "$(PWD)":/usr/share/nginx/html:ro -d nginx & | |
| #fire up a browser and point it at local host | |
| open http://localhost | |
| #get the container ID to kill it later... |
| #This script will create the required Dockerfile, docker-compose.yml, Gemfile, etc. and create a new rails app (using postgres) | |
| #BEWARE! It will overwrite any existing files in the folder including Dockerfile, docker-compose.yml, and README.md | |
| #the databses will be called "myapp_development", and "myapp_test" | |
| cat << EOF > Dockerfile | |
| FROM ruby:latest | |
| #USER $USER | |
| #make sure we don't get tripped up by any inherited proxies | |
| #RUN unset HTTP_PROXY | |
| #RUN unset HTTPS_PROXY |
| # What is it? Use docker to host an html file using nginx! | |
| # Pre-requisites: You've installed docker and logged into docker-hub | |
| #make our html file | |
| echo "<h1>Hello world</h1>" > index.html | |
| #start docker and mount our current working directory into nginx | |
| docker run -p 80:80 -v "$(PWD)":/usr/share/nginx/html:ro -d nginx | |
| #go have a look! |
| //generic function to get JSON from a github API endpoint | |
| function getJSON(url) { | |
| // Your github username | |
| username = "<USERNAME>" | |
| // Your access token (see https://github.com/settings/tokens) | |
| password = "<ACCESS_TOKEN>" | |
| //basic auth using access token | |
| var options = {}; | |
| options.headers = {"Authorization": "Basic " + Utilities.base64Encode(username + ":" + password)}; |
| [http] | |
| proxy = http://some-proxy:80 | |
| [https] | |
| proxy = http://some-proxy:80 | |
| [alias] | |
| #co = checkout | |
| #br = branch | |
| ci = commit | |
| st = status | |
| co = !git checkout |
| //use this to get current counts of Pull Requests to put into a dashboard. | |
| // Things to update: YOUR_USER_NAME, YOUR_ACCESS_TOKEN, YOUR_REPO_PATH (see below) | |
| // add custom menu | |
| function onOpen() { | |
| var ui = SpreadsheetApp.getUi(); | |
| ui.createMenu('Custom GitHub Menu') | |
| .addItem('Get User Repos','getUserRepos') | |
| .addItem('Get rate quota','getGitHubRateLimit') | |
| .addToUi(); |
| #This file contains some useful steps for interacting with specific page elements, moving forwards and backwards in time, etc. They're pretty low-level so you might use them to get started but eventually you'll want to write your own application-specific steps. | |
| #things to do before each scenario | |
| Before do |scenario| | |
| end | |
| #and after.... | |
| After do |scenario| | |
| end |
| ( | |
| Server.default.options.device = "BlackHole 16ch"; | |
| //Server.default.options.device = "Built-in Output"; | |
| //ServerOptions.devices; | |
| //handle large delay sizes | |
| //s.options.memSize= 8192*2; | |
| //s.reboot; |
| #!/bin/bash | |
| # For recording flac & mp3 files (with compression and silence trimming) | |
| # Prerequisite: sox | |
| #`brew install sox --with-lame --with-flac --with-libvorbis` | |
| # For recording flac & mp3 files. | |
| # Grab your laptop | |
| # Plug in your USB sound device |