View maglev.log
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
$ rails new my-awesome-site \ | |
-m https://raw.githubusercontent.com/maglevhq/maglev-core/master/template.rb \ | |
--database=postgresql \ | |
--skip-action-cable | |
create | |
create README.md | |
create Rakefile | |
create .ruby-version | |
create config.ru |
View signature_controller.js
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
import { Controller } from "@hotwired/stimulus" | |
import SignaturePad from 'signature_pad' | |
export default class extends Controller { | |
static targets = ["canvas", "input"] | |
connect() { | |
this.signaturePad = new SignaturePad(this.canvasTarget) | |
this.signaturePad.addEventListener("endStroke", this.endStroke) | |
this.resizeCanvas() | |
if (this.inputTarget.value) { |
View slim-select.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
.ss-main { | |
@apply relative inline-block select-none w-full text-slate-500; | |
} | |
.ss-main .ss-single-selected { | |
@apply flex cursor-pointer w-full min-h-[38px] p-[6px]; | |
@apply bg-white border border-gray-200 shadow-sm rounded outline-0; | |
@apply transition-colors duration-200; | |
} | |
.ss-main .ss-single-selected.ss-disabled { | |
@apply bg-slate-300 cursor-not-allowed; |
View commits-since-last-production-deploy.sh
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
#!/bin/bash | |
help() { | |
echo "Usage: ./bin/commits-since-last-production-deploy [-a myapp ] [ -h ]" | |
exit 2 | |
} | |
if ! command -v heroku &>/dev/null; then | |
echo "Install 'heroku' CLI" | |
exit 1 |
View docker-compose.yml
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
version: "3.2" | |
services: | |
dev: | |
image: tianon/true | |
restart: "no" | |
depends_on: | |
- db | |
- redis | |
db: |
View schema_dumper.rb
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
# This solution was based on https://gist.github.com/GlenCrawford/16163abab7852c1bd550547f29971c18 | |
Rails.configuration.to_prepare do | |
ActiveRecord::SchemaDumper.ignore_tables = %w[ | |
salesforce._hcmeta | |
salesforce._sf_event_log | |
salesforce._trigger_log | |
salesforce._trigger_log_archive | |
] | |
end |
View application_reflex.rb
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 ApplicationReflex < StimulusReflex::Reflex | |
before_reflex do | |
jwt = ShopifyApp::JWT.new(element.data_jwt) # pass in "Bearer: blah" | |
if jwt | |
self.headers = {"jwt.shopify_domain" => jwt.shopify_domain, "jwt.shopify_user_id" => jwt.shopify_user_id} | |
end | |
end | |
end |
View Procfile
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
web: ./bin/rackup -p "$PORT" |
View Gemfile
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
gem "google-id-token" |
View AlignmentWidget.vue
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
<template> | |
<span class="p-1 inline-flex items-center rounded-lg bg-gray-200"> | |
<button | |
@click="alignmentSelected = 'left'" | |
:class="alignmentSelected == 'left' ? 'bg-white shadow' : 'hover:bg-gray-400'" | |
class="p-1 rounded-lg" | |
> | |
<svg class="h-6 w-6 text-gray-200" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 333 333"> | |
<path | |
stroke="currentColor" |
NewerOlder