- Zero Downtime
- Graceful shutdowns
- Via Github Actions
- Zero infrastructure management overhead
The general idea is to have Github Actions test, build and deploy a Rails app to Google Cloud Compute Engine.
#!/usr/bin/env bash | |
set -x | |
black=$1 | |
input_file=$2 | |
start_line=$3 | |
end_line=$4 | |
# Read selected lines and write to tmpfile |
package main | |
import ( | |
"fmt" | |
"math" | |
"strconv" | |
) | |
var ( | |
sizeInMB float64 = 999 // This is in megabytes |
# References | |
# OhMyZsh: https://github.com/robbyrussell/oh-my-zsh | |
# Powerlevel9k: https://github.com/bhilburn/powerlevel9k | |
# Powerline fonts: https://github.com/powerline/fonts | |
# Awesome Terminal Fonts: https://github.com/gabrielelana/awesome-terminal-fonts | |
# ZSH Syntax Highlighting: https://github.com/zsh-users/zsh-syntax-highlighting | |
# | |
# For more plugins search this repo: https://github.com/unixorn/awesome-zsh-plugins | |
# 256 color mode |
// NOTE: the '#form-id' selector below will most certainly be different | |
// for whatever page you're on. Remember to change it in both instances! | |
// run this in the terminal to save the state of your form | |
// in your browser's LocalStorage: | |
[].forEach.call(document.querySelector('#form-id').elements, function(el) { | |
localStorage.setItem(el.name, el.value); | |
}); | |
// then refresh the page and run this to restore your form values: |
from random import shuffle | |
slices = [1,2,3] * 4 + [20, 25, 30] * 2 | |
shuffle(slices) | |
fig = plt.figure(figsize=[10, 10]) | |
ax = fig.add_subplot(111) | |
cmap = plt.cm.prism | |
colors = cmap(np.linspace(0., 1., len(slices))) |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: