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/sh | |
# Based on BMitch's answer from: | |
# https://stackoverflow.com/questions/38946683/how-to-test-dockerignore-file | |
# Note: will create and delete temporary file "Dockerfile.build-context" | |
# 1. Copy to project folder where image is being built | |
# 2. Run script | |
# 3. You should see list of files in build context |
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
.eot - application/vnd.ms-fontobject | |
.woff - application/font-woff | |
.ttf - application/x-font-truetype | |
.svg - image/svg+xml | |
.otf - application/x-font-opentype | |
IIS (Web.Config) | |
<remove fileExtension=".eot" /> | |
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /> | |
<remove fileExtension=".ttf" /> |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
#!/usr/bin/env ruby | |
require 'openssl' | |
class Blowfish | |
def self.key | |
Rails.application.secrets.secret_key_base | |
end | |
def self.encrypt(decrypted_string, salt=nil) |
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
/* Foca no código! | |
.---. | |
/o o\ | |
__(= " =)__ | |
//\'-=-'/\\ | |
) (_ | |
/ `"=-._ | |
/ \ ``"=. |
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
namespace :deploy do | |
task :setup_solr, roles: :app do | |
run "mkdir -p #{shared_path}/solr/data" | |
put File.read('config/sunspot.yml'), "#{shared_path}/config/sunspot.yml" | |
end | |
end | |
namespace :solr do | |
def solr_config |
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
after "deploy:create_symlink", "resque:restart_workers" | |
after "resque:restart_workers", "resque:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |