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 lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| <title> Test display of HTML elements </title> | |
| <!-- based off of https://www.cs.tut.fi/~jkorpela/www/testel.html, with additions of newer features --> | |
| </head> | |
| <body> | |
| <header> | |
| <h1>Testing display of HTML elements</h1> |
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
| brew update && brew upgrade && brew cleanup |
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
| # Toggles the hidden flag on the partition. I don't want it visible on my desktop | |
| sudo /Developer/Tools/SetFile -a V /Volumes/BOOTCAMP # or whatever the partitions called |
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
| # 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
| { | |
| "always_run_in_app" : false, | |
| "icon" : { | |
| "color" : "deep-purple", | |
| "glyph" : "magic" | |
| }, | |
| "name" : "Add to Newsletters", | |
| "script" : "const input = args.plainTexts[0] || \"test@example.com\";\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" |
NewerOlder