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
/* base32 */ | |
/* | |
Copyright (c) 2011, Chris Umbel | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 debian:stretch-slim | |
# Set up a node group + user, minimal .bashrc, .gemrc, install packages | |
RUN groupadd --gid 1000 node \ | |
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node \ | |
&& echo 'export LS_OPTIONS="--color=auto"\ | |
\nalias ls="ls $LS_OPTIONS"\ | |
\nalias ll="ls $LS_OPTIONS -l"\ | |
\nalias l="ls $LS_OPTIONS -lA"' >> "$HOME/.bashrc" \ | |
&& echo "gem: --no-rdoc --no-ri" > "$HOME/.gemrc" |
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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title> | |
sample-coi.pdf | |
- FormAPI.io</title> | |
<link rel="stylesheet" media="all" href="/assets/bootstrap-4e3cebc9fbc5fb97aaa32ed51a086b63d9fef4e3ce46082c4ecd8fa5dc3ddc2d.css" /> | |
<link rel="stylesheet" media="all" href="/assets/web_form-be7376ecee212758c2e2f9e8c0ddd9f280c703b32cc8bb0a7afe3da0139d8336.css" /> |
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
#!/bin/bash | |
# Proof of concept: | |
# * Build two Docker images | |
# * Deconstruct them into a directory with skopeo | |
# * Merge the layers together, and update digests in manifest/config | |
# * Reconstruct a merged Docker image with skopeo | |
# * Show the Docker history of the reconstructed image, and show that | |
# files from both images can be accessed in the merged image. |
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
group :development, :test do | |
gem 'spring-commands-rspec', require: false | |
gem 'spring-watcher-listen', require: false | |
gem 'spring', require: false | |
# ... | |
end |
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
# frozen_string_literal: true | |
# Run this with: rake storage:migrate | |
class ShrineFileMigrationService | |
def self.migrate_files!(options = {}) | |
dry_run = options[:dry_run] | |
verbose = options[:verbose] | |
unless Shrine.version.to_s == '2.19.3' |
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
#!/bin/bash | |
set -e | |
# CI Cache Script for Google Cloud Storage | |
# TIP: Set CI_CACHE_VERBOSE=true while testing the script | |
# to show a list of all files that are compressed/extracted. | |
# Note that you might see "tar: write error" if there are too many | |
# files in the verbose output. |
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
# ~/.bashrc | |
# Here's a nice alert sound you can use: https://www.dropbox.com/s/ctziqfuqt5q9fek/alert.mp3?dl=0 | |
# Find some more here: https://notificationsounds.com/notification-sounds | |
alias alert="afplay ~/sounds/alert.mp3" | |
function n() { | |
local ALERT="Alert from Bash" | |
local EXIT_CODE=0 |
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
#!/bin/bash | |
set -e | |
# When running on a local machine, we need to kill the Spring loader. | |
if [ -f .env ]; then spring stop; fi | |
# Ensures that the Rails app can boot and pass a simple health check. | |
export RAILS_ENV=production | |
export PORT=4123 | |
export DATABASE_URL=postgresql:does_not_exist |
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
#!/bin/bash | |
set -e | |
# When running on a local machine, we need to kill the Spring loader. | |
if [ -f .env ]; then spring stop; fi | |
# Ensures that the Rails app can boot and pass a simple health check. | |
# Also ensures that RubyEncoder is working for the enterprise image. | |
export RAILS_ENV=production |