Skip to content

Instantly share code, notes, and snippets.

View nilcolor's full-sized avatar
💫
API by day, IPA by night

Alexey Blinov nilcolor

💫
API by day, IPA by night
View GitHub Profile
@nilcolor
nilcolor / paperclip.rb
Created August 5, 2016 21:03
Paperclip [0] patch
#/config/initializers/paperclip.rb
require 'paperclip/geometry_detector_factory'
require 'paperclip/thumbnail'
# HACK: Monkey patch to remove `[0]` from the end of filename.
# Actual until https://github.com/thoughtbot/paperclip/issues/2223
# rubocop:disable all
module Paperclip
class GeometryDetector
private
@nilcolor
nilcolor / Intro to Common Table Expressions.md
Created July 30, 2018 13:23 — forked from felixyz/Intro to Common Table Expressions.md
Introduction to transitive closure / Common Table Expressions / iterative queries in SQL

Teh Social Netswork!

CREATE TABLE users (
 id SERIAL PRIMARY KEY,
 name VARCHAR(10) NOT NULL
);

INSERT into users VALUES

@nilcolor
nilcolor / Makefile
Created December 25, 2018 21:43 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)