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 / MB puma + Nginx settings
Last active Oct 28, 2019
MB puma + Nginx settings
View MB puma + Nginx settings
# /config/puma.rb
app = "manabalss" # App-specific
root = "/home/deployer/apps/#{app}"
workers 5
threads 1, 1 # relying on many workers for thread-unsafe apps
rackup DefaultRackup
port 11592
Epigene / LatvianHashPlus.keylayout
Last active Oct 26, 2019
Latvian key layout with Shift+3 producing # symbol.
View LatvianHashPlus.keylayout
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2.8 on 2014-09-16 at 09:30 (GMT+3)-->
<!--Last edited by Ukelele version on 2015-11-15 at 20:41 (EET)-->
<keyboard group="0" id="13634" maxout="1" name="LatvianHashPlus">
<layout first="0" last="0" mapSet="138" modifiers="30"/>
<modifierMap defaultIndex="8" id="30">
<keyMapSelect mapIndex="0">
View Karabiner custom

Karabiner Elements v12.7.0 custom rule setup

  1. Open ~/.config/karabiner/assets/complex_modifications
  2. Make a new *.json rule file
  3. Put the rule json in there.
  4. Reload Karabiner and add the rule.

Control + D to Show Desktop

Epigene / Dokku v0.5.6 Rails
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

Dokku v0.5.6 Rails workflow

Straight to Maintenance

0. Set up Droplet

Initialize the droplet with dokku app pre-setup
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 / 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 / gist:47c059a825acd4445e61
Created Jun 27, 2015
First Data FDL response (error) codes
View gist:47c059a825acd4445e61
"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
You can’t perform that action at this time.