sudo su
# Remove MariaDB packages
yum list installed | grep -i maria
yum remove mariadb.x86_64
yum remove mariadb-libs.x86_64
# Download MySQL 5.7 RPM tar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script processes events from smsd. | |
# It mainly will converts SMS encoded with UCS2 encoding to UTF-8 format expected by many other applications. | |
# To use it, edit your /etc/smsd.conf and add the following line: | |
# | |
# eventhandler = /path/to/smstools-eventhandler.sh | |
# | |
# When a new message is received in /var/spool/incoming/, message files with following header line will be converted: | |
# |
Change Apple OS X Dock size from Apple Terminal
defaults write com.apple.dock tilesize -int 32; killall Dock
32
is icon size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# on system boot, and root have no rbenv installed, | |
# after start-stop-daemon switched to current user, we have to init rbenv | |
if [ -d "$HOME/.rbenv/bin" ]; then | |
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" | |
eval "$(rbenv init -)" | |
elif [ -d "/usr/local/rbenv/bin" ]; then | |
PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH" | |
eval "$(rbenv init -)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: puma | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org/" | |
gem "sinatra", "~> 1.3.0" | |
gem "thin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
production: | |
adapter: fb | |
database: ~/Documents/redmine/db/redmine.fdb | |
username: SYSDBA | |
password: masterkey | |
host: localhost | |
encoding: UTF-8 | |
create: true | |
development: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TenantModel | |
def self.included(base) | |
base.extend ClassMethods | |
base.instance_eval do | |
acts_as_tenant | |
end | |
end | |
class InvalidTenant < SecurityError; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generates link to new issue form with prefilled values | |
// save the following code(single line) as bookmark | |
// use on new issue form to generate link | |
javascript:try{$('textarea[id=issue_description]').val(CKEDITOR.instances["issue_description"].getData());}catch(e){}s=$.param($('#issue-form *[name!=authenticity_token]').serializeArray());alert(location.href+"?"+s); |