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
# Transfer MySQL Database dump | |
mysqldump -u USER_NAME -h REMOTE_HOST --password=USER_PASWORD --compress --databases DATABASE_NAME | pv | gzip -c > DATABASE_NAME.sql.gz | |
# Rollout dump to local MySQL | |
gunzip -c DATABASE_NAME.sql.gz | mysql -u root -p DATABASE_NAME |
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
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/rvm' | |
# Usually mina focuses on deploying to one host and the deploy options are therefore simple. | |
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to | |
# specify the host that we are targeting. | |
server = ENV['server'] | |
# Since the same host can have multiple applications running in parallel, it is necessary to |
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
#!/usr/bin/env bash | |
## | |
# Run with: | |
# | |
# curl -sSL https://gist.githubusercontent.com/noma4i/1346b3997978c5ae2643/raw/68830673a7f70bf47264841b4d523a4ddc7eb687/rmate-setup.sh | bash -s | |
# | |
mkdir -p ~/bin | |
curl -Lo ~/bin/rmate https://raw.github.com/textmate/rmate/master/bin/rmate |
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
validate email: /\A([\w\.\-\+]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i | |
validate url: ^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/ix | |
validate ip: /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i | |
validate ip ranges: /^\b(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-4]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]?)\b$/i | |
validate netmask: /^(((128|192|224|240|248|252|254)\.0\.0\.0)|(255\.(0|128|192|224|240|248|252|254)\.0\.0)|(255\.255\.(0|128|192|224|240|248|252|254)\.0)|(255\.255\.255\.(0|128|192|224|240|248|252|254)))$/i |
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
CREATE TABLE `time_zone` ( | |
`Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', | |
PRIMARY KEY (`Time_zone_id`) | |
) ENGINE=MyISAM AUTO_INCREMENT=1676 DEFAULT CHARSET=utf8 COMMENT='Time zones'; | |
CREATE TABLE `time_zone_leap_second` ( | |
`Transition_time` bigint(20) NOT NULL, | |
`Correction` int(11) NOT NULL, | |
PRIMARY KEY (`Transition_time`) | |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones'; |
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
Downloading/unpacking pip | |
Downloading/unpacking setuptools | |
Installing collected packages: pip, setuptools | |
Successfully installed pip setuptools | |
Cleaning up... | |
Downloading/unpacking python-keystoneclient | |
Downloading/unpacking python-swiftclient | |
Downloading/unpacking iso8601>=0.1.9 (from python-keystoneclient) | |
Downloading iso8601-0.1.10.tar.gz | |
Running setup.py (path:c:\users\admini~1\appdata\local\temp\1\pip_build_Administrator\ |
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/Solarized (dark).tmTheme", | |
"font_size": 12, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Handlebars", |
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
require 'redmine' | |
require_dependency 'string' | |
require_dependency 'element' | |
require_dependency 'views_issues_index_bottom_hook' | |
ActionDispatch::Callbacks.to_prepare do | |
SettingsHelper.__send__(:include, SettingsHelperPatch) | |
Mailer.__send__(:include, LoaderMailer) | |
Issue.__send__(:include, IssuePatch) |
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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
#DROPBOX SYNCING | |
#============== | |
# bash_profile | |
rm -rf .bash_profile | |
ln -s ~/Dropbox/.bash_profile .bash_profile | |
# Sublime 2 Preferences | |
cd ~/Library/Application\ Support/Sublime\ Text\ 2/ | |
ln -s ~/Dropbox/appdata/sublime/Installed\ Packages ./Installed\ Packages |