Gist simplicity can turn blogging into a liberating experience.
Pros | Cons |
---|---|
✅ Free, simple, fast, hassle-free | ❌ Image upload in comments only |
✅ Tagging | ❌ No post pinning |
✅ Search | ❌ Doesn't look like a blog |
✅ Revisions | ❌ Unfriendly URLs |
# lib/tasks/db_fixtures_export.rake | |
namespace 'db:fixtures' do | |
desc "generate fixtures from the current database" | |
task :export => :environment do | |
Rails.application.eager_load! | |
models = defined?(ApplicationRecord) ? ApplicationRecord.descendants : ActiveRecord::Base.descendants | |
models.each do |model| | |
puts "exporting: #{model}" |
<div id="chart"></div> | |
<div id="legend"></div> |
.git | |
.gitignore | |
/doc | |
.yardoc | |
coverage | |
jsdoc | |
/tmp | |
/log | |
Dockerfile | |
Dockerfile.prod |
if ENV["SEMAPHORE_CACHE_DIR"] | |
config.assets.configure do |env| | |
env.cache = ActiveSupport::Cache::FileStore.new(ENV["SEMAPHORE_CACHE_DIR"]) | |
end | |
end |
This tutorial assumes you are running a Rails application on Heroku with a Unicorn server. However, if you are not using one of those you will find some general information which can help you in your context.
This article will help you to correctly configure your Unicorn server based on real data.
I recommend you to use New Relic, which is really easy to setup with Rails & Heroku. It will help you monitoring your application and configure it at its best.
/** | |
* Prevent click events after a touchend. | |
* | |
* Inspired/copy-paste from this article of Google by Ryan Fioravanti | |
* https://developers.google.com/mobile/articles/fast_buttons#ghost | |
* | |
* USAGE: | |
* Prevent the click event for an certain element | |
* ```` | |
* PreventGhostClick(myElement); |
var | |
styleSheets = document.styleSheets, | |
totalStyleSheets = styleSheets.length; | |
for (var j = 0; j < totalStyleSheets; j++){ | |
var | |
styleSheet = styleSheets[j], | |
rules = styleSheet.cssRules, | |
totalRulesInStylesheet = rules.length, | |
totalSelectorsInStylesheet = 0; |
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff |
::Redis::Client.class_eval do | |
# Support older versions of Redis::Client that used the method | |
# +raw_call_command+. | |
call_method = ::Redis::Client.new.respond_to?(:call) ? :call : :raw_call_command | |
def call_with_stats_trace(*args, &blk) | |
method_name = args[0].is_a?(Array) ? args[0][0] : args[0] | |
start = Time.now | |
begin |