Skip to content

Instantly share code, notes, and snippets.

Augusts Bautra Epigene

Block or report user

Report or block Epigene

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Epigene
Epigene / Dokku v0.5.6 Rails App.md
Last active Aug 1, 2019
Knowledge-Base for getting a Rails5 app with Cable running on dokku v0.5.6
View Dokku v0.5.6 Rails App.md

Dokku v0.5.6 Rails workflow

Straight to Maintenance

0. Set up Droplet

Initialize the droplet with dokku app pre-setup
@Epigene
Epigene / deploy.rb
Last active Jun 14, 2019
Mina deployment file for rails applications
View deploy.rb
# Mina Deploy
# ===========
#
# Adapted from Creative deploy stack in Manabalss v4, Mar.2015, updated to support staging on Jun.2015
# On first deploy do: mina setup --verbose
# Then do : mina deploy[initialize] --trace
#
# Usage examples:
# mina deploy[soft,seed,compile] to=staging # deploy task with all options | a simple `mina deploy` will deploy to production
# mina rake[db:seed] # for multi-argument tasks # mina 'rake[payments:refund[arg1\,arg2]]'
@Epigene
Epigene / production.rb
Last active Dec 21, 2018
Dokku v0.4.x app production environment file
View production.rb
Rails.application.configure do
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_files = false
config.assets.js_compressor = :uglifier
config.assets.compile = false
@Epigene
Epigene / gist:47c059a825acd4445e61
Created Jun 27, 2015
First Data FDL response (error) codes
View gist:47c059a825acd4445e61
RESPONSE_CODES = {
"000" => "Approved",
"001" => "Approved, honour with identification",
"002" => "Approved for partial amount",
"003" => "Approved for VIP",
"004" => "Approved, update track 3",
"005" => "Approved, account type specified by card issuer",
"006" => "Approved for partial amount, account type specified by card issuer",
"007" => "Approved, update ICC",
"100" => "Decline (general, no comments)",
View gist:e459b4642552f3bb85b58f6bce775369
SELECT `applications`.* FROM `applications` LEFT OUTER JOIN `agreements` `agreements_f0` ON `applications`.`id` = `agreements_f0`.`application_id` WHERE ((`applications`.`hidden` = ? OR `applications`.`hidden` IS ?)) AND ((LOWER(`applications`.`client_name`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_email`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_identification_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone2`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone3`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone4`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_vin`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_no2`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_technical_certificate_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_technical_certificate_no2`) LIKE LOWER(?)) OR (LOWER(`applications`.`number`) LIKE LOWER(?)) OR (LOWER(`applications`.`reque
@Epigene
Epigene / ruby.json
Last active Aug 31, 2018
Ruby (predominantly RSpec) snippets for VSC.
View ruby.json
{
"scope spec template": {
"prefix": "scope_spec",
"body": [
"describe \".SCOPE_NAME\" do",
" subject(:collection) { described_class.SCOPE_NAME }",
"",
" context \"when instantiating actual records\", :slow do",
" let!(:match) { create(:FACTORY, :TRAIT) }",
" let!(:counter) { create(:FACTORY) }",
@Epigene
Epigene / UbuntuRedis.md
Last active Aug 15, 2018
Install Redis on your Production Ubuntu
View UbuntuRedis.md

Install deps

sudo apt-get update
sudo apt-get install -y build-essential tcl8.5

Get code

cd /tmp
@Epigene
Epigene / Nim Spells.md
Created Jul 17, 2018
Some know-how and cheats for Nim programming languages
View Nim Spells.md

Compiling with the -d:release flag will turn the bounds checks off. This will result in higher performance but less safety.

You can’t perform that action at this time.