Skip to content

Instantly share code, notes, and snippets.

@ipepe
ipepe / provision.sh
Last active January 10, 2017 13:00
Setup ubuntu with ajenti v for Rails
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 February 9, 2017 21:28
Setup rails production server with rbenv, postgres nginx and passenger
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 February 10, 2017 07:05
Test out installation script
# -*- 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 March 16, 2017 09:00 — forked from anonymous/start_redis_for_development.sh
commandline to start redis for developers
#!/bin/bash
docker run -p 6379:6379 --restart=unless-stopped -d --name redis redis:alpine
#!/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
docker run -p 27017:27017 --restart=unless-stopped -d --name mongo mongo
@ipepe
ipepe / .rubocop.yml
Last active May 17, 2017 15:21
Pairguru rubocop.yml file + all Severities are fatal (not finished)
---
AllCops:
Include:
- "**/*.rake"
- "**/Gemfile"
- "**/Rakefile"
Exclude:
- vendor/**/*
- db/**/*
DisplayCopNames: false
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',
window.sleep = (time_in_miliseconds, callback)->
time = Date.now()+time_in_miliseconds
while(Date.now() < time)
Math.Pi/3.14
callback() if callback
#!/bin/bash
docker run -v ~/docker/redmine-pnpr/data:/data -p 4567:80 --restart=unless-stopped -d --name redmine ipepe/pnpr:v1