- Make a new Automator document of type "App"
- Add these three steps in order
- Remember to replace
mikker
with your own username in the AppleScript scripts
This file contains hidden or 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 bash | |
set -euo pipefail | |
issue=$1 | |
~/.claude/local/claude \ | |
"Start working on issue #$issue | |
- Keep an open mind. Feel free to reconsider the proposed approach | |
- Use context7 for updated docs |
This file contains hidden or 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
# usage: | |
# thing = todot(keys: { get: { turned: ["into", "reader", "methods"] } }) | |
# thing.keys.get.turned | |
# # => ["into", "reader", "methods"] | |
require "ostruct" | |
def todot(obj) | |
case obj | |
when Array |
This file contains hidden or 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
# Usage: | |
# | |
# class Post < ApplicationRecord | |
# include HasNanoid | |
# has_nanoid | |
# end | |
# | |
module HasNanoid | |
extend ActiveSupport::Concern |
This file contains hidden or 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> | |
<head> | |
<script> | |
window.BUCKET_OPTIONS = <%= bucket_options.to_json.html_safe %> | |
</script> | |
<%= javascript_include_tag :application %> | |
</head> | |
<body> | |
<!-- ... --> |
This file contains hidden or 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
# app/models/stripe_events/account_updated.rb | |
module StripeEvents | |
class AccountUpdated | |
def call(event) | |
# do your thing | |
Rails.logger.debug(event.data.object) | |
end | |
end | |
end |
This file contains hidden or 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 | |
class SlimLine | |
KNOWN_TAGS = "div|header|footer|aside|section|article|nav|main|ul|ol|li|a|p|h1|h2|h3|h4|h5|h6|span|button|form|input|textarea|select|option|label|fieldset|legend|table|thead|tbody|tr|td|th" | |
RE = %r{^(?<whitespace>\s*)(?<tag>(#{KNOWN_TAGS})\b)?(?<id>#[a-z\-]+)?(?<class_list>(\.[-a-z][a-z0-9\-:\/]*)+)?(?<rest>.*)?} | |
def initialize(line) | |
@line = line.dup | |
end |
This file contains hidden or 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
{ | |
"always_run_in_app" : false, | |
"icon" : { | |
"color" : "deep-purple", | |
"glyph" : "magic" | |
}, | |
"name" : "Add to Newsletters", | |
"script" : "const input = args.plainTexts[0] || \"[email protected]\";\nconst emails = input.match(\/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9._-]+)\/gi);\nconst email = emails[0];\n\n\nconst containers = await ContactsContainer.all();\n\nlet container, group;\nfor (const c of containers) {\n const groups = await ContactsGroup.all([c]);\n const newsletters = groups.find(g => g.name === \"Newsletters\");\n if (!newsletters) continue;\n container = c;\n group = newsletters;\n}\n\nconst contact = new Contact();\ncontact.emailAddresses =[{ value: email }];\nContact.add(contact, container.identifier);\ngroup.addMember(contact);\n\nawait Contact.persistChanges();\n\nconst alert = new Alert();\nalert.title = email;\nalert.addAction(\"OK\")\nalert.present();\n\n", | |
"share_sheet_inputs" : [ | |
"plain-text" |
This file contains hidden or 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_relative "sheet.rb" | |
require 'digest' | |
CURRENT_BLOCK = 12345 | |
COMMUNITY_REACTIONS = 54321 | |
def main | |
sheet = Sheet.new('Metadata/InvisibleFriends_Metadata.csv') | |
sheet.headers.concat(['Seed', 'Filename', 'SHA256']) |
This file contains hidden or 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 | |
# Usage: | |
# $ ensure_docker_is_ready && docker-compose up | |
docker ps &> /dev/null | |
if [ $? -ne 0 ]; then | |
open -a Docker.app | |
else | |
exit 0 |
NewerOlder