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
# install the 32 bit binaries first | |
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 | |
# download android studio and extract it | |
# after extraction, navigate to android-studio-ide-193.6626763-linux/android-studio/bin | |
chmod +x studio.sh | |
./studio.sh | |
# after install, create a throw-away project and hit control + shift + a for search, look up AVD manager and install some emulators | |
# after that, click on Tools > Desktop Entry to create a shortcut in the launcher |
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
SitemapGenerator::Sitemap.default_host = "https://your-domain.com" | |
SitemapGenerator::Sitemap.create do | |
add blog_index_path | |
add new_visitor_inquiry_path | |
add services_path | |
add about_index_path | |
end |
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
<%= favicon_link_tag asset_path('your logo path') %> | |
<% %w(32 128 76 120 152 167 180 192 196).each do |size| %> | |
<%= favicon_link_tag "/icons/your-logo.png", rel: 'apple-touch-icon', type: 'image/png', sizes: "#{size}x#{size}" %> | |
<% end %> | |
<% %w(16 32).each do |size| %> | |
<%= favicon_link_tag "/icons/your-logo.png", rel: 'icon', type: 'image/png', sizes: "#{size}x#{size}" %> | |
<% end %> |
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
<%= turbo_frame_tag dom_id(tweet) do %> | |
<div class="card m-4"> | |
<div class="card-body"> | |
<%= tweet.content %> | |
</div> | |
<div class="card-footer bg-transparent border-success"> | |
<%= link_to 'Show', tweet, class: 'btn btn-sm btn-primary text-white' %> | |
<%= link_to 'Edit', edit_tweet_path(tweet), class: 'btn btn-sm btn-warning text-white', remote: true %> | |
<%= link_to 'Destroy', tweet, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-danger text-white' %> | |
</div> |
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
<p id="notice"><%= notice %></p> | |
<h1>Tweets</h1> | |
<table> | |
<thead> | |
<tr> | |
<th colspan="3"></th> | |
</tr> | |
</thead> |
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
class Tweet < ApplicationRecord | |
has_rich_text :content | |
after_create_commit {broadcast_prepend_to "tweets"} | |
after_update_commit {broadcast_replace_to "tweets"} | |
after_destroy_commit {broadcast_remove_to "tweets"} | |
end |
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
/* fix not rendering on chrome/safari */ | |
.react-transform-component { | |
width: unset !important; | |
height: unset !important; | |
} | |
.react-transform-element { | |
width: unset !important; | |
height: unset !important; | |
} |