Forward GnuPG agent from macOS to Linux
Run gpg once as your to create the directory structure
gpg --list-keys
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
-- Open automator | |
-- * New Service | |
-- * Service Recieves: no input | |
-- * Paste the following | |
-- * Alter audio sources to match your machine | |
-- * Save | |
-- Open Keyboard | |
-- * Shortcuts | |
-- * Services | |
-- * Bind to shortcut |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
with_exclusive_lock("my_operation") do | |
# Something that can only happen one at a time | |
end | |
def with_exclusive_lock(lock_name, &block) | |
lock_file_name = "/tmp/#{lock_name}.lock" | |
FileUtils.touch(lock_file_name) | |
lock_file = File.new(lock_file_name) | |
lock_file.flock(File::LOCK_EX) | |
yield |
////// Save as index.js and upload it to Lambda as zip archive with node_modules directory. After: | |
////// npm install aws-cloudwatch-chart | |
////// npm install request | |
////// no need to upload aws-sdk module | |
////// Don't forget to change API keys here. | |
////// License: MIT | |
////// Docs: |
db/schema.rb merge=railsschema |
# RSpec matcher to spec delegations. | |
# Forked from https://gist.github.com/ssimeonov/5942729 with fixes | |
# for arity + custom prefix. | |
# | |
# Usage: | |
# | |
# describe Post do | |
# it { should delegate(:name).to(:author).with_prefix } # post.author_name | |
# it { should delegate(:name).to(:author).with_prefix(:any) } # post.any_name | |
# it { should delegate(:month).to(:created_at) } |
This is a set of helpers for finding the application's currently active models/routes/controllers/etc. This isn't a straightforward process because of how Ember (rightly) encapsulates application objects, but it's useful in debugging environments to be able to quickly access them. And with the beta release of Ember Data, the store is not easily accessible without helpers either.
All helpers can be called directly if you provide them an application instance:
>> code = Urlcode.uuid_to_code("4c3559f0-cd95-482f-a27d-b2bbc68523ef") | |
=> "䰵姰축䠯ꉽ늻욅⏯" | |
>> Urlcode.code_to_uuid(code) | |
=> "4c3559f0-cd95-482f-a27d-b2bbc68523ef" |