NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
Improved YARD CHEATSHEET http://yardoc.org
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
# Compresses all .js and .css files under the assets path. | |
namespace :deploy do | |
# It is important that we execute this after :normalize_assets because | |
# ngx_http_gzip_static_module recommends that compressed and uncompressed | |
# variants have the same mtime. Note that gzip(1) sets the mtime of the | |
# compressed file after the original one automatically. | |
after :normalize_assets, :gzip_assets do | |
on release_roles(fetch(:assets_roles)) do | |
assets_path = release_path.join('public', fetch(:assets_prefix)) | |
within assets_path do |
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
SELECT *
, Specify explicit column names (columnar store)Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict
, Javascript has "use strict"
, and Visual Basic has Option Strict
. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:
set -euo pipefail
set -e
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
// Remove all drafts from your drafts view | |
// Navigate to drafts | |
// F12 to raise dev console | |
// Paste the below | |
(async function(x) { | |
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) { | |
e.click(); | |
await new Promise(resolve => setTimeout(resolve, 500)) | |
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click(); | |
await new Promise(resolve => setTimeout(resolve, 1500)) |