This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local grid = {} | |
local window = require 'mjolnir.window' | |
function grid.snap(win, x, y, w, h) | |
local newframe = { | |
x = x, | |
y = y, | |
w = w, | |
h = h, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app: | |
build: . | |
command: bundle exec rails server -b 0.0.0.0 --pid=/tmp/app.pid | |
volumes: | |
- .:/usr/src/app | |
links: | |
- proxy | |
environment: | |
- VIRTUAL_HOST=app.d | |
expose: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "string" | |
os = require "os" | |
alert = require "alert" | |
local alert_threshold = read_config("alert_threshold") or 5 | |
local alert_throttle_time = read_config("alert_throttle_time") or 300 | |
local nanosecondsInASecond = 1000000000 | |
alert.set_throttle(alert_throttle_time * nanosecondsInASecond) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local os = require "os" | |
local alert = require "alert" | |
alert.set_throttle(60 * 1e9) | |
local host1 = "box1" | |
local host2 = "box2" | |
while true do | |
local current_time = os.time() * 1e9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun go-coverage-current-file | |
(let ((coverage-file "/tmp/coverage.out") | |
(args (s-concat | |
"--coverprofile=" | |
coverage-file))) | |
(go-test-run args) | |
(go-coverage coverage-file))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// buildRedirect creates a 302 redirect for the request | |
func buildRedirect(request *http.Request) *http.Response { | |
log.Printf("transport: building redirect for: %s", request.URL.String()) | |
response := &http.Response{ | |
StatusCode: http.StatusFound, | |
Header: make(map[string][]string), | |
Body: buildEmptyBody()} | |
response.Header.Add("Location", request.URL.String()) | |
return response | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {app, BrowserWindow, ipcMain} = require('electron') | |
const http = require('http') | |
const url = require('url') | |
app.disableHardwareAcceleration() | |
let window | |
app.once('ready', () => { | |
window = new BrowserWindow({ | |
show: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.4.1 | |
RUN gem install 'bundle-audit' | |
ADD Gemfile ./ | |
ADD Gemfile.lock ./ | |
# We never want the `bundle audit update` to be cached. So this will help bust | |
# the cache if you include this in your build command: | |
# `--build-arg CACHEBUST=$(date +%s)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am andrewhampton on github. | |
* I am andrewhampton (https://keybase.io/andrewhampton) on keybase. | |
* I have a public key ASB_VmqoAx-RJVDx0xG6c-Z1K7Kpt4QvstZmWP-LkLFD9Qo | |
To claim this, I am signing this object: |