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/bash | |
if [[ -z $1 ]]; then | |
APP_NAME=$(basename `pwd`) | |
else | |
APP_NAME=$1 | |
fi | |
echo "Opening Rails Console for $APP_NAME in vagrant..." | |
cd ~/vagrant && vagrant ssh -c "cd /pub/$APP_NAME/current && bundle exec rails console" |
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
find ./app/models -type f -exec sed -i '' -e "s/ActiveRecord\:\:Base/ApplicationRecord/g" {} \; |
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
select t.*, (select json_group_array(json_object('id', s.id, 'amount', s.amount))) from transactions t join transactions s on s.primary_transaction_id = t.id where t.id = 2; |
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
find ./src -type f -exec sed -i '' -e 's/ApiClient/RestApiClient/' {} \; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" media="screen" href="https://fonts.googleapis.com/css?family=Questrial"> | |
<style> | |
body { | |
font-family: Questrial, Arial, 'sans-serif' | |
} | |
.row { |
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
module CallChain | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
private | |
def define_function(name, function) | |
define_method(name) { function } |