View gist:699c992d2fa6ae73a4e790c5c58aa284
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
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
RELEASE=$(git branch -a | grep -Eo 'release/\d{2}.\d{2}.\d{2}' | tail -n 1) | |
git checkout ${RELEASE} && git pull | |
git checkout ${BRANCH} && git rebase ${RELEASE} |
View React Inspect props
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
<pre> | |
<code>{JSON.stringify(props, null, 4)}</code> | |
</pre> |
View eslint config react
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
{ | |
"extends": [ | |
"eslint:recommended", | |
"plugin:import/errors", | |
"plugin:react/recommended", | |
"plugin:jsx-a11y/recommended", | |
"prettier", | |
"prettier/react" | |
], | |
"rules": { |
View gist:7b24c5b5463c51f1683319fdcd077308
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
#!/usr/bin/env ruby | |
require 'yaml' | |
class UnsupportedDatabaseAdapter < RuntimeError | |
attr_reader :adapter | |
def initialize(adapter) | |
@adapter = adapter |
View gist:431271af6f29492348201ddf63a1fe0d
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
def find_word(word) | |
the_file="#{Rails.root}/app/models/release_asset.rb" | |
file = File.open(the_file, "r") | |
index = 0 | |
file.each_line { |line| | |
if line.include?(word) | |
index+=1 | |
end | |
} |
View pre-commit
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
#!/usr/bin/env ruby | |
class CheckForDebug | |
def self.run | |
@files = `git grep --all-match -e 'binding.pry' --and --not -e 'add binding' --line-number` | |
exit_and_notify if @files.length > 0 | |
exit 0; | |
end | |
def self.exit_and_notify | |
p @files.strip |