A Pen by Matt Daniel Brown on CodePen.
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
You'll need to update the following variables: | |
- ENV['APP_NAME'] | |
- ENV['COMPANY_ADDRESS'] | |
- ENV['HOST'] | |
Make sure you have app/assets/images/logo.svg for this line: | |
helpers.image_url('logo.svg') | |
And also update the CSS variables to match your color scheme: | |
:root { |
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
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 |
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
# .github/workflows/main.yaml | |
name: Main | |
on: [push] | |
jobs: | |
vm-job: | |
name: CI | |
runs-on: ubuntu-latest |
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
class Saga | |
class << self | |
def with_redis; raise NotImplementedError; end | |
attr_accessor :cleanup_delay, :queue, :last_txid | |
def queue | |
Thread.current[:saga_queue] ||= [] | |
end | |
def last_txid |

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
defmodule MyModule.Router do | |
@moduledoc """ | |
Http Entry Point | |
""" | |
use Plug.Router | |
use Plug.ErrorHandler | |
plug Plug.Logger | |
plug :match |
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
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('service-worker.js').then(function(registration) { | |
// Registration was successful | |
console.log('ServiceWorker registration successful with scope: ', registration.scope); | |
registration.pushManager.subscribe({userVisibleOnly: true}).then(function(subscription){ | |
isPushEnabled = true; | |
console.log("subscription.subscriptionId: ", subscription.subscriptionId); | |
console.log("subscription.endpoint: ", subscription.endpoint); | |
// TODO: Send the subscription subscription.endpoint |
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
Copyright (c) 2015, Dorian Rudolph | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
NewerOlder