Skip to content

Instantly share code, notes, and snippets.

@ipepe
ipepe / provision.sh
Last active Jan 10, 2017
Setup ubuntu with ajenti v for Rails
View provision.sh
sudo locale-gen "en_US.UTF-8"
sudo nano /etc/environment
#LC_ALL=en_US.UTF-8
#LANG=en_US.UTF-8
sudo reboot
adduser ajenti
usermod -a -G admin ajenti
apt-get autoremove && apt-get remove apache2*
@ipepe
ipepe / install.sh
Last active Feb 9, 2017
Setup rails production server with rbenv, postgres nginx and passenger
View install.sh
sudo locale-gen "en_US.UTF-8"
sudo nano /etc/environment
#LC_ALL=en_US.UTF-8
#LANG=en_US.UTF-8
sudo reboot
adduser webapp
usermod -a -G admin webapp
nano /etc/apt/sources.list.d/pgdg.list
@ipepe
ipepe / Vagrantfile
Created Feb 10, 2017
Test out installation script
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
# config.vm.network "forwarded_port", guest: 80, host: 8282 # WebDAV
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.ssh.forward_agent = true
@ipepe
ipepe / start_redis_for_development.sh
Created Mar 16, 2017 — forked from anonymous/start_redis_for_development.sh
commandline to start redis for developers
View start_redis_for_development.sh
#!/bin/bash
docker run -p 6379:6379 --restart=unless-stopped -d --name redis redis:alpine
View start_postgres_for_development.sh
#!/bin/bash
docker run -p 5432:5432 --restart=unless-stopped -d --name postgres -e POSTGRES_PASSWORD=Password1 -e POSTGRES_USER=webapp postgres:9.6.2-alpine
View gist:3a51130e22e488003a43b4ee80dd9610
docker run -p 27017:27017 --restart=unless-stopped -d --name mongo mongo
@ipepe
ipepe / .rubocop.yml
Last active May 17, 2017
Pairguru rubocop.yml file + all Severities are fatal (not finished)
View .rubocop.yml
---
AllCops:
Include:
- "**/*.rake"
- "**/Gemfile"
- "**/Rakefile"
Exclude:
- vendor/**/*
- db/**/*
DisplayCopNames: false
View migrate_rubocop.rb
rules = {
'Layout/AndOr' => 'Style',
'Layout/BarePercentLiterals' => 'Style',
'Layout/BracesAroundHashParameters' => 'Style',
'Layout/ClassAndModuleChildren' => 'Style',
'Layout/ClassCheck' => 'Style',
'Layout/CollectionMethods' => 'Style',
'Layout/CommentAnnotation' => 'Style',
'Layout/Encoding' => 'Style',
View start_elasticsearch_for_development.sh
#!/bin/bash
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.8.4
View startup_redmine.sh
#!/bin/bash
docker run -v ~/docker/redmine:/root/shared -p 8080:3000 --restart=unless-stopped -d --name redmine redmine:3.3.0