Skip to content

Instantly share code, notes, and snippets.

#
# /etc/systemd/system/mariadb.service
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Thanks to:
# Daniel Black
@cassioalmeidas
cassioalmeidas / Gemfile
Created March 1, 2016 18:35 — forked from nebiros/Gemfile
rails + unicorn + rbenv + init.d daemon
group :production do
gem "unicorn"
end
@cassioalmeidas
cassioalmeidas / deploy.rb
Last active August 29, 2015 14:12 — forked from stas/deploy.rb
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# require 'mina/rvm' # for rvm support. (http://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm' # for rvm support. (http://rvm.io)
set :domain, 'esdb.cn'
set :identity_file, '/User/somebody/.ssh/somebody.pem'
set :deploy_to, '/home/ubuntu/apps/xxx.com'
set :repository, 'ssh://git@bitbucket.org/somebody/xxx.com.git'
set :branch, 'master'
@cassioalmeidas
cassioalmeidas / mysql-fullbackup.sh
Created April 30, 2014 16:53
MySQL full backup script
#!/bin/bash
#
# mysql-fullbackup.sh
# v0.1 - 20120921
#
# Full Backup for Zabbix w/MySQL
#
# Author: Ricardo Santos (rsantos at gmail.com)
# http://zabbixzone.com
#
# This uses the Sequel gem to do the heavy lifting of connecting together the various
# DBs involved in this process. It was really difficult 2 weeks ago, and really easy yesterday.
# I love that.
require 'sequel'
require 'date'
# The Drupal DB
DB = Sequel.connect(
@cassioalmeidas
cassioalmeidas / .gemrc
Created January 6, 2014 22:02
Minhas configurações para gems.
# ~/.gemrc
---
:verbose: true
:bulk_threshold: 1000
install: --no-ri --no-rdoc --env-shebang
:sources:
- http://gemcutter.org
- http://gems.rubyforge.org/
- http://gems.github.com
:benchmark: false
#!/bin/bash
# a simple script to uninstall ossec (tested on debian)
# Author: Han The Thanh <h a n t h e t h a n h @ g m a i l . c o m>
# Public domain.
# this script has been tested on debian; it should also work on other linux
# systems but I have not tested. If you want to be careful and need to see what
# would be done without executing any real action, uncomment the following line:
# dryrun="echo "