This file contains 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
# https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/ | |
git clone --bare https://github.com/kaipr/dotfiles $HOME/.dotfiles | |
function dotf { | |
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
} | |
dotf checkout | |
if [ $? = 0 ]; then |
This file contains 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
# Original java code | |
RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); | |
if (economyProvider != null) { | |
economy = economyProvider.getProvider(); | |
} | |
# Converted to Ruby | |
economy_class = (Java::net.milkbowl.vault.economy.Economy).java_class | |
#> class net.milkbowl.vault.economy.Economy | |
economy_provider = getServer.getServicesManager.getRegistration(economy_class) |
This file contains 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: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
This file contains 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
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb | |
index b6f0511..5223ac5 100644 | |
--- a/activerecord/lib/active_record/fixtures.rb | |
+++ b/activerecord/lib/active_record/fixtures.rb | |
@@ -842,8 +842,8 @@ module ActiveRecord | |
def fixtures(*table_names) | |
if table_names.first == :all | |
- table_names = Dir["#{fixture_path}/**/*.{yml,csv}"] | |
- table_names.map! { |f| f[(fixture_path.size + 1)..-5] } |