-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy /personal from my configs on Shopify repo
- Loading branch information
Lekë Mula
committed
Jan 22, 2023
1 parent
33954bc
commit d518066
Showing
15 changed files
with
1,505 additions
and
33 deletions.
There are no files selected for viewing
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Add your preferred git settings here. This will overwrite anything in `core/configs/.gitconfig`. |
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 file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,9 @@ | |
# Vim | ||
*.swp | ||
*.swo | ||
.undodir/ | ||
|
||
.DS_Store | ||
tags.* | ||
projections.json | ||
.projections.json |
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
snippet testu "Create unit test class" | ||
# typed: false | ||
# frozen_string_literal: true | ||
|
||
require "test_helper" | ||
|
||
class ${1:Class}ListTest < ActiveSupport::TestCase | ||
test$0 | ||
end | ||
endsnippet |
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
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
alias gcofzf='git checkout $(git branch --all | fzf)' | ||
alias gcobfzf='git checkout -b $(git branch --all | fzf)' | ||
alias gcob='git checkout -b' | ||
alias mkdir='mkdir -p' |
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Additional oh-my-zsh plugins to include | ||
# Default bundles included can be seen in core/default_bundles.zsh | ||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins for available oh-my-zsh plugins. | ||
# See https://github.com/zsh-users/antigen/wiki/Commands#antigen-bundle for instructions on including custom plugins. | ||
# | ||
# Include a plugin with `antigen bundle <plugin-name>`. | ||
|
||
# Do not wrap `antigen theme` or `antigen bundle` in conditions. Antigen has cache invalidation issues. | ||
# If you want to conditionally load bundles, uncomment the following line: | ||
# ANTIGEN_CACHE=false | ||
# You can read more in https://github.com/zsh-users/antigen/wiki/Commands#antigen-theme for info on how to define | ||
# custom caching keys for different environments, if you desire that. The cache speeds up your terminal startup, so | ||
# try to avoid disabling the cache unless you have no other choice. | ||
|
||
# Staples theme: https://github.com/romkatv/powerlevel10k | ||
antigen theme romkatv/powerlevel10k | ||
|
||
# https://github.com/zsh-users/zsh-autosuggestions | ||
antigen bundle zsh-users/zsh-autosuggestions | ||
# https://github.com/zsh-users/zsh-syntax-highlighting | ||
antigen bundle zsh-users/zsh-syntax-highlighting | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/aliases | ||
antigen bundle aliases | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git | ||
antigen bundle git | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/bundler | ||
antigen bundle bundler | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/dotenv | ||
antigen bundle dotenv | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/macos | ||
antigen bundle macos | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rake | ||
antigen bundle rake | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rbenv | ||
antigen bundle rbenv | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ruby | ||
antigen bundle ruby | ||
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rails | ||
antigen bundle rails |
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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# frozen_string_literal: true | ||
|
||
require "json" | ||
|
||
result = {} | ||
|
||
components = Dir.glob('**/app') | ||
.delete_if { |dir | dir.start_with?('app/assets/') } | ||
.delete_if { |dir | dir.start_with?('gems/') } | ||
.delete_if { |dir | dir.start_with?('sorbet/') } | ||
.map { |dir| dir.split("/")[1..-2] } | ||
|
||
%w[ts js].each do |x| | ||
result["*.test.#{x}"] = { | ||
alternate: %w[ts js].map do |y| | ||
[ | ||
"{}.#{y}", | ||
"{dirname|dirname}{basename}.#{y}", | ||
] | ||
end.flatten, | ||
} | ||
result["*.#{x}"] = { | ||
alternate: %w[ts js].map do |y| | ||
[ | ||
"{}.test.#{y}", | ||
"{dirname}/__tests__/{basename}.test.#{y}", | ||
] | ||
end.flatten, | ||
} | ||
end | ||
|
||
template = [ | ||
"# frozen_string_literal: true", | ||
"# typed: true", | ||
"", | ||
"class {camelcase|capitalize|colons}", | ||
"end", | ||
] | ||
|
||
components.each do |component| | ||
component = component.join("/") | ||
warn component | ||
|
||
result["components/#{component}/app/*.rb"] = { | ||
"alternate": [ | ||
"components/#{component}/test/{}_test.rb", | ||
"components/#{component}/test/unit/{}_test.rb", | ||
], | ||
"type": "source", | ||
"template": template, | ||
} | ||
result["components/#{component}/app/models/*.rb"] = { | ||
"alternate": [ | ||
"components/#{component}/test/{}_test.rb", | ||
"components/#{component}/test/unit/{}_test.rb", | ||
], | ||
"type": "model", | ||
"template": template, | ||
} | ||
result["components/#{component}/test/unit/*_test.rb"] = { | ||
"alternate": [ | ||
"components/#{component}/app/models/{}.rb", | ||
"components/#{component}/app/{}.rb", | ||
], | ||
"type": "test", | ||
"template": "", | ||
} | ||
result["components/#{component}/test/*_test.rb"] = { | ||
"alternate": "components/#{component}/app/{}.rb", | ||
"type": "test", | ||
"template": "", | ||
} | ||
end | ||
|
||
puts result.to_json |
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
Oops, something went wrong.