Skip to content

Instantly share code, notes, and snippets.

View proapi's full-sized avatar
🚲
Working from home

Michał Pawelski proapi

🚲
Working from home
View GitHub Profile
@proapi
proapi / diff-schema.sh
Created May 11, 2016 12:58
Command line to grep changes in schema.rb
g diff -U0 master..HEAD -- db/schema.rb | tail -n +6 | grep -e "-\|+" | grep -v -e 'ActiveRecord'
@proapi
proapi / passenger
Last active August 29, 2015 14:22 — forked from cblunt/myapp
Passenger init script #linux #bash #server
#!/bin/bash
### BEGIN INIT INFO
# Provides: myapp passenger in standalone
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop myapp.com web site
### END INIT INFO
#PATH=/sbin:/usr/sbin:/bin:/usr/bin
@proapi
proapi / ruby.md
Last active August 29, 2015 14:06
Ruby code tools/debuggers #bash #rails #ruby

Ruby code tools/debuggers

Brakeman

Example code:

$ brakeman -o raport.html

$ brakeman --skip-files file1,file2 // exclude files

@proapi
proapi / gitconfig
Last active August 29, 2015 14:05
Git pre-push hook to check against debug functions in code #git #bash
[init]
templatedir = ~/.git-templates
[color]
ui = always
[grep]
extendRegexp = true
lineNumber = true
fullName = true
[color "grep"]
filename = green
@proapi
proapi / index.slim
Last active August 29, 2015 14:01
How to use decent_exposure in tests #rails #tests
= render "shared/followed_header"
.followed-container
= render users
@proapi
proapi / nginx_unicorn
Last active August 29, 2015 13:57
nginx_unicorn #nginx #unicorn #devops #config
upstream padrino {
# Path to Unicorn SOCK file, as defined previously
server unix:/tmp/unicorn.padrino.sock fail_timeout=0;
}
server {
listen 80;
server_name padrino.proapi.eu;
# Application root, as defined previously