Skip to content

Instantly share code, notes, and snippets.

View bartwork's full-sized avatar
🎯
Focusing

Alexander bartwork

🎯
Focusing
View GitHub Profile
@bartwork
bartwork / digital_ocean_setup.md
Created November 15, 2015 14:43 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@bartwork
bartwork / server.md
Created February 22, 2016 01:45 — forked from jtadeulopes/server.md
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone

@bartwork
bartwork / nginx.conf
Created July 26, 2018 15:35 — forked from denisoster/nginx.conf
Nginx+RoR(Puma)+SSL+redirect
upstream site {
server unix:/home/site/web/site.com.ua/site/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name site.com.ua www.site.com.ua;
rewrite ^(.+)$ https://site.com.ua$uri permanent;
}
@bartwork
bartwork / confirm-overwrite.js
Created February 17, 2020 02:23 — forked from tomazy/confirm-overwrite.js
Overwrite `window.confirm` with a custom modal dialog (Rails + jquery-ujs + data-confirm attribute)
(function() { [9/55928]
'use strict';
function showConfirmBox(message, cb) {
var $modal = $('.js-modal-confirm');
var $btnYes = $modal.find('.js-yes')
var $btnCancel = $modal.find('.js-cancel')
$modal.find('.js-message').text(message)