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
[ | |
{ | |
"name": "Aboleth", | |
"meta": "Large aberration, lawful evil", | |
"Armor Class": "17 (Natural Armor)", | |
"Hit Points": "135 (18d10 + 36)", | |
"Speed": "10 ft., swim 40 ft. ", | |
"STR": "21", | |
"STR_mod": "(+5)", | |
"DEX": "9", |
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
select concat(fks.constraint_schema, '.', fks.table_name) as foreign_table, | |
'->' as rel, | |
concat(fks.unique_constraint_schema, '.', fks.referenced_table_name) | |
as primary_table, | |
fks.constraint_name, | |
group_concat(kcu.column_name | |
order by position_in_unique_constraint separator ', ') | |
as fk_columns | |
from information_schema.referential_constraints fks | |
join information_schema.key_column_usage kcu |
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 Solver | |
def self.solve!(my_array, my_string) | |
# my_array.each { |k| my_string.gsub!(k, " #{k} ") } | |
# my_string.split.join(' ') | |
# Working: | |
my_string.gsub(/(#{my_array.sort_by(&:length).reverse.join("|")})\s*/, ' \1').split.join(' ') | |
# my_string.gsub(/(#{my_array.join("|")})\s*/, ' \1') | |
# my_array.sort_by(&:length).each { |k| my_string.gsub!(/#{k}\s*/, " #{k}") } |
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
# Number 1 | |
input = %w[therapy fun is] | |
string = 'therapyisfunfunfunfunis' | |
input.each { |k| string.gsub!(k, " #{k} ") } | |
string.split.join(' ') | |
# Number 2 | |
# Same solution as 1 |
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
rails plugin new elemental -d mysql --mountable -T --dummy-path=spec/dummy --skip-action-mailer -C --skip-turbolinks --skip-action-cable --skip-spring --skip-active-storage --skip-coffee --skip-yarn --api -p |
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
# https://github.com/rails-api/rails-api/issues/72 | |
# https://github.com/rails/rails/blob/v5.2.3/railties/lib/rails/application.rb#L579 | |
Rails::Application.class_eval do | |
if defined?(::Rails.logger) | |
Rails.logger.warn '[initializers][AA_rails_hacks] - Patching Rails Application class' | |
else | |
puts '[initializers][AA_rails_hacks] - Patching Rails Application class' | |
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
<snippet> | |
<content><![CDATA[${TM_SELECTED_TEXT/([\t ]*).*/$1/m}begin | |
${3:${TM_SELECTED_TEXT/(\A.*)|(.+)|\n\z/(?1:$0:(?2:\t$0))/g}} | |
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}rescue ${1:Exception}${2/.+/ => /}${2:e} | |
${TM_SELECTED_TEXT/([\t ]*).*/$1/m} $0 | |
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}end | |
]]></content> | |
<tabTrigger>begin</tabTrigger> | |
<scope>source.ruby - comment</scope> | |
<description>begin … rescue … end</description> |
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
$("a.minimization").each(function(index) { | |
$(this).trigger('click'); | |
}); |
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
find . -name ".DS_Store" -print | xargs rm |
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
[Macros] | |
hot=cqf hotkeys activate | |
[Hotkeys] | |
F2= | |
F3= | |
Shift-1=hot 1 | |
Shift-2=hot 2 | |
Shift-3=hot 3 | |
Shift-4=hot 4 |
NewerOlder