Skip to content

Instantly share code, notes, and snippets.

View vasche's full-sized avatar

Evgeny Voronin vasche

  • Moscow, Russia
View GitHub Profile
@vasche
vasche / 42-things.md
Created November 28, 2017 23:33 — forked from xdite/42-things.md
Ten (42) Things You Didn't Know Rails Could Do
@vasche
vasche / nginx-config-rails4-with-puma-ssl-version.conf
Created February 13, 2017 20:33 — forked from rkjha/nginx-config-rails4-with-puma-ssl-version.conf
Nginx config for rails 4 application using puma [ssl and non-ssl version]
upstream myapp_puma {
server unix:/tmp/myapp_puma.sock fail_timeout=0;
}
# for redirecting to https version of the site
server {
listen 80;
rewrite ^(.*) https://$host$1 permanent;
}
@vasche
vasche / ssl_puma.sh
Last active November 3, 2017 11:19 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
# Создайте свой закрытый ключ (подойдет любой пароль, мы удалим его командой ниже)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
# Удалить пароль
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459