Skip to content

Instantly share code, notes, and snippets.

View pftg's full-sized avatar
💭
I may be slow to respond.

Paul Keen pftg

💭
I may be slow to respond.
View GitHub Profile
@pftg
pftg / Procfile
Created July 18, 2018 14:57
Heroku Review Setup for Ruby on Rails 5
release: bin/heroku-release
web: bundle exec puma -C config/puma.rb
@pftg
pftg / config_environments_test.rb
Last active January 13, 2018 21:14
Involved browser caching for test in Rails 4 application
Rails.application.configure do
# ...
# For Rails 4 we need to add those settings
config.serve_static_files = true
config.static_cache_control = 'public, max-age=2592000'
config.assets.digest = true
config.assets.debug = false
if ENV['CI']
config.assets.compile = false
@pftg
pftg / .circleci_config.yml
Created January 13, 2018 21:03
Pre-compile Assets and Cache for CircleCI
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
build:
environment:
BUNDLE_GEMFILE: Gemfile
BUNDLE_WITHOUT: "production:staging:development"
@pftg
pftg / .circleci_config.yml
Created January 13, 2018 21:02
Pre-compile Assets and Cache for CircleCI
- restore_cache:
keys:
- v1-asset-cache-{{ arch }}-{{ .Branch }}
- v1-asset-cache-
- run: bundle exec rake assets:precompile
- save_cache:
key: v1-asset-cache-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
@pftg
pftg / .circleci_config-assets-cache-changes.yml
Last active January 12, 2018 20:05
Rails 4/5 Tests Speedup by Assets Precompilation
- restore_cache:
keys:
- v1-asset-cache-{{ arch }}-{{ .Branch }}
- v1-asset-cache-
- run: bundle exec rake assets:precompile
- save_cache:
key: v1-asset-cache-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
@pftg
pftg / .circleci_config.yml
Created December 25, 2017 12:11
Speed Up your Rails Test Suite on CI by 10%
# Add after bundle install section
- restore_cache:
keys:
- v1-asset-cache-{{ arch }}-{{ .Branch }}
- v1-asset-cache-
- run: bundle exec rake assets:precompile
- save_cache:
@pftg
pftg / .circleci-config.yml
Created December 1, 2017 02:09
Typical pronto setup for Ruby on Rails + GitHub + CircleCI 2.0
# .circleci/config.yml
version: 2
jobs:
lint:
environment:
- BUNDLE_GEMFILE: Gemfile.tools
docker:
# specify the version you desire here
- image: circleci/ruby:2.4.2-stretch-node-browsers
environment:

Keybase proof

I hereby claim:

  • I am pftg on github.
  • I am pftg (https://keybase.io/pftg) on keybase.
  • I have a public key ASCMuwK47cZW2OTDGVxqtBf7NSDr0bwRGLtOfj3Cp6errQo

To claim this, I am signing this object:

@pftg
pftg / daemon.json
Last active December 28, 2016 18:32
Docker Engine Service Confs for TeamCity Agents Containers
// /etc/docker/daemon.json
{
"dns": ["8.8.8.8", "8.8.4.4"],
"graph": "/mnt/storage/var/lib/docker",
"storage-driver": "overlay2",
"log-driver": "none"
}
@pftg
pftg / osx-install-ffmpeg.sh
Last active October 12, 2016 10:23
Compress digital material on OSX
#!/bin/sh
brew reinstall --force ffmpeg \
--with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi \
--with-libvorbis --with-libvpx --with-opus --with-x265