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 ruby | |
| require 'bundler/inline' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails' | |
| gem 'active_model_serializers', github: "runtastic/active_model_serializers" | |
| 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
| require 'bundler/inline' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activesupport', require: 'active_support' | |
| gem 'colorize' | |
| end | |
| require 'colorize' | |
| require 'active_support/core_ext/object/deep_dup' |
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 ruby | |
| require 'bundler/inline' | |
| require 'securerandom' | |
| require 'delegate' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails' | |
| gem 'active_model_serializers', github: "runtastic/active_model_serializers" |
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 "bundler/inline" | |
| gemfile(true) do | |
| gem "fuzzy-string-match", require: "fuzzystringmatch" | |
| gem "pry" | |
| end | |
| class Bar | |
| def method_missing(m) | |
| raise "ahaha" |
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
| class Delegator | |
| def initialize(array) | |
| @array = array | |
| end | |
| def method_missing(method, *args, &block) | |
| @array.send(method, *args, &block) | |
| end | |
| 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
| function gdiff -d "Better git diff" | |
| if [ (count $argv) -eq 0 ] | |
| set argv "HEAD" | |
| end | |
| set output (git diff --cached -U10 $args | wdiff --diff-input -a -n -w '\e[0;35m' -x '\e[0m' -y '\e[0;36m' -z '\e[0m') | |
| print_var $output | less -R | |
| 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
| alias cpy "xclip -i -selection clipboard" |
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
| function print_var | |
| for line in $argv | |
| echo -e $line | |
| end | |
| 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
| # Global variables | |
| setenv FISH_PATH "~/.config/fish/" | |
| setenv FISH_CONF "$FISH_PATH/config.fish" | |
| # Aliases | |
| alias cpy "xsel -i -b" | |
| alias conf "e $FISH_CONF" | |
| alias load-conf ". $FISH_CONF" |
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
| # From this | |
| class FooSerializer < ActiveModel::Serializer | |
| def id | |
| object.uuid | |
| end | |
| def type | |
| object.class.to_s.underscore | |
| end | |
OlderNewer