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
#! /usr/bin/env ruby | |
# This dumps all known transactions (including engines) in standard controller#action format to STDOUT | |
# | |
# Built against private Rails 5.2.x APIs so success with other Rails versions is likely to be hit and miss. | |
require_relative "../config/environment" | |
class CustomInspector < ActionDispatch::Routing::RoutesInspector | |
def format(formatter, filter = nil) |
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
DROP FUNCTION IF EXISTS dj_extract_active_job_class_from_handler; | |
CREATE FUNCTION dj_extract_active_job_class_from_handler(handler TEXT) | |
RETURNS TEXT DETERMINISTIC | |
RETURN SUBSTRING_INDEX( | |
SUBSTRING_INDEX(handler, '\n job_id: ', 1), | |
'job_class: ', -1); | |
DROP FUNCTION IF EXISTS dj_extract_class_method_from_handler; | |
CREATE FUNCTION dj_extract_class_method_from_handler(handler TEXT) | |
RETURNS TEXT DETERMINISTIC |
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
require "aws-sdk-s3" | |
require "shellwords" | |
require "json" | |
def handler(event:, context:) | |
# Get the record | |
first_record = event["Records"].first | |
bucket_name = first_record["s3"]["bucket"]["name"] | |
object_key = first_record["s3"]["object"]["key"] |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Wonderblum ⁕</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<link rel="shortcut icon" type="image/png" href="https://thebetter.email/favicon.png"> | |
<style type="text/css"> | |
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
db/schema.rb merge=railsschema |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>github.com/jonschlinkert</string> |
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
diff --git i/db/schema.rb w/db/schema.rb | |
index 8052e88..7617614 100644 | |
--- i/db/schema.rb | |
+++ w/db/schema.rb | |
@@ -610,7 +610,7 @@ ActiveRecord::Schema.define(version: 20160408155519) do | |
add_index "builder_recipients", ["account_id"], name: "index_builder_recipients_on_account_id", using: :btree | |
add_index "builder_recipients", ["email"], name: "index_builder_recipients_on_email", using: :btree | |
- add_index "builder_recipients", ["opted_token"], name: "index_builder_recipients_on_opted_token", unique: true, using: :btree | |
+ add_index "builder_recipients", ["opted_token"], name: "index_builder_recipients_on_opted_token", unique: true, length: {"opted_token"=>100}, using: :btree |
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
dayofweek=`date +%u` # Monday is 1 | |
hourofday=`date +%H` | |
if test $dayofweek -lt 6 -a $hourofday -gt 8 -a $hourofday -lt 19 | |
then | |
(hostname | grep koto > /dev/null 2>&1) && cd ~/working/litmus | |
fi | |
# Nice idea, but doesn't play well with my iTerm config for default dirs |
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
# see http://stackoverflow.com/questions/21994466/signature-did-not-match-on-azure-sas-url | |
# see https://msdn.microsoft.com/library/azure/dn140255.aspx | |
# see https://msdn.microsoft.com/en-us/library/azure/dn140256.aspx | |
# see https://github.com/Azure/azure-sdk-for-ruby/issues/162 | |
# This assumes the Azure Ruby SDK is already loaded and initialized with appropriate config | |
# Note we need the empty strings as the empty lines are required in the signed string | |
DEFAULTS = { | |
path: '/', |
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
2.1.5 (main):0 > Time.now.strftime('%Y-%m-%d %H:%M:%S.%L') | |
=> "2015-03-06 10:09:12.974" | |
2.1.5 (main):0 > str = Time.now.strftime('%Y-%m-%d %H:%M:%S.%L') | |
=> "2015-03-06 10:09:26.497" | |
2.1.5 (main):0 > Time.parse(str) | |
=> 2015-03-06 10:09:26 +0000 | |
2.1.5 (main):0 > t = Time.parse(str) | |
=> 2015-03-06 10:09:26 +0000 | |
2.1.5 (main):0 > t.strftime('%Y-%m-%d %H:%M:%S.%L') | |
=> "2015-03-06 10:09:26.497" |
NewerOlder