This gist contains lists of modules available in
in AWS Lambda.
This gist contains lists of modules available in
in AWS Lambda.
Relevant Rails PRs
h/t to http://juanitofatas.com/2015/01/31/rails-5-active-record-or/ for some more useful links
I have a project that's been happily chugging along on Travis for a while. Its .travis.yml
looks something like
script:
- node_modules/ember-cli/bin/ember test
I wanted to add a second parallel build that did something very different. I didn't want to run ember test
with a different Ember version or some other flag. I wanted to run a completely different command. Specifically, I wanted to run LicenseFinder's audit.
Travis has great docs on customizing parallel builds, but nothing describes how to do two completely different commands.
require_relative "test_helper" | |
require "open-uri" | |
require "net/http" | |
class EmojiTest < Blog::Test | |
def test_no_emoji | |
posts.each do |post| | |
content = File.read(post) | |
refute_match /:[a-zA-Z0-9_]+:/, content, |
This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.
I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.
Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) [email protected]
#!/bin/bash | |
# Output is a script which installs all currently installed packages from | |
# homebrew, including those from tabs. Packages no longer available are ignored | |
# Usage: | |
# ./backup-homebrew.sh > my-homebrew-backup.sh | |
# | |
# warnings about packages not available anymore will be generated | |
# |
Date: [[Date of Document]] Between [Our Company] and [Your Company]
We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.
require "awesome_print" | |
module XmlParsing | |
require "ox" | |
class Reader < ::Ox::Sax | |
def initialize file_path, target, target_handler | |
@target_handler = target_handler | |
@target = target | |
@file_path = file_path |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
namespace :db do | |
require "sequel" | |
Sequel.extension :migration | |
DB = Sequel.connect(ENV['DATABASE_URL']) | |
desc "Prints current schema version" | |
task :version do | |
version = if DB.tables.include?(:schema_info) | |
DB[:schema_info].first[:version] | |
end || 0 |