git checkout -b <branchname>
git add
git commit
git checkout <branchname>
git rebase origin/develop
#!/usr/bin/env bash | |
if command -v overmind &> /dev/null | |
then | |
overmind start -f Procfile.dev "$@" | |
exit $? | |
fi | |
if ! foreman version &> /dev/null | |
then |
<p class="foo">Foo</p> | |
<p class="bar">Bar</p> |
#mine | |
def self.keyword_search_mobile(attributes={}, user_attributes={}, offset = nil, limit = nil) | |
scope = [] | |
if !attributes[:search].blank? | |
search = attributes.with_indifferent_access[:search] | |
scope = self.all( | |
:conditions => [ | |
"short_desc ~* ? OR keywords ~* ? OR title ~* ?", | |
/\y#{search}\y/, /\y#{search}\y/, /\y#{search}\y/ | |
] |
description "Sidekiq Background Worker" | |
start on filesystem | |
stop on runlevel [06] | |
respawn | |
respawn limit 3 30 | |
# change to match your deployment user | |
setuid deploy |
### Nginx upstart script | |
### source: http://serverfault.com/a/391737/70451 | |
### /etc/init/nginx.conf | |
description "nginx http daemon" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/etc/nginx/sbin/nginx |
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
worker_rlimit_nofile 8192; | |
events { | |
worker_connections 8000; | |
} |
/* ACL Tables */ | |
CREATE TABLE acos ( | |
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, | |
parent_id INT DEFAULT NULL, | |
model VARCHAR(255) DEFAULT '', | |
foreign_key INT UNSIGNED DEFAULT NULL, | |
alias VARCHAR(255) DEFAULT '', | |
lft INT DEFAULT NULL, | |
rght INT DEFAULT NULL |