This code:
1 formResults = { ... };
2 console.log("first name: " + formResults.firstName);
3 console.log("last name: " + formResults.lastName);
4 console.log("email: " + formResults);
has the following output:
// ==UserScript== | |
// @name Gmail Sender Utils | |
// @namespace https://github.com/szhu | |
// @match https://mail.google.com/mail/u/* | |
// @version 1.3 | |
// @author Sean Zhu | |
// @description Quickly drill down by sender or label in Gmail. | |
// @homepageURL https://gist.github.com/szhu/1d816086307c5de02bc9a2bb1cf01fe0 | |
// @updateURL https://gist.github.com/szhu/1d816086307c5de02bc9a2bb1cf01fe0/raw/gmail-sender-utils.user.js | |
// @downloadURL https://gist.github.com/szhu/1d816086307c5de02bc9a2bb1cf01fe0/raw/gmail-sender-utils.user.js |
#!/bin/sh | |
# File formatted with shell-format. | |
# | |
# This tool creates a disk image to put node_modules in. This makes it so that | |
# when the disk image is not mounted, it is treated as a single file by | |
# Spotlight and other tools to do expensive tasks on a per-file basis. | |
set -e | |
# Utils |
import AppKit | |
import ApplicationServices | |
import CoreFoundation | |
import Foundation | |
// Helpers | |
// https://github.com/keith/ModMove/blob/main/ModMove/AXValue%2BHelper.swift | |
extension AXValue { | |
func toValue<T>() -> T? { |
// ==UserScript== | |
// @name Summarize Page Text | |
// @namespace https://github.com/szhu | |
// @description Use OpenAI GPT-3 to summarize the text on the page into 3 key points. | |
// @match *://*/* | |
// ==/UserScript== | |
// @ts-strict | |
const API_KEY = "API_KEY"; |
// 1. Export the file to PDF. | |
// | |
// 2. Convert it to SVG: | |
// | |
// inkscape $file.pdf -o $file.svg --export-text-to-path | |
// | |
// Note: Don't use pdftocairo or pdf2svg; they don't work properly with the next steps. | |
// | |
// 3. Open the SVG file in your browser. | |
// |
#!/bin/bash | |
# Add thumbnails to images. This works well for document images (like PDFs), | |
# where the top of the image is the most important. | |
for file in "$@"; do | |
# `--cropOffset 0 0` doesn't do anything, so we use a small offset. | |
sips \ | |
-s format png \ | |
--resampleWidth 512 \ | |
--cropOffset 0 0.001 \ |
-- https://forum.kicad.info/t/zoom-with-scroll-wheel-but-pan-with-trackpad-on-macos/11974 | |
figmaScrollToZoom = hs.eventtap.new({hs.eventtap.event.types.scrollWheel}, function(e) | |
-- Trackpad scroll events are continuous, mouse scroll events are not. | |
if 0 == e:getProperty(hs.eventtap.event.properties.scrollWheelEventIsContinuous) then | |
local front = hs.application.frontmostApplication() | |
if "Figma" == front:name() then | |
-- local title = front:focusedWindow():title() | |
-- if "Eeschema" == title:sub(0, 8) or "Pcbnew" == title:sub(0, 6) then | |
local flags = e:getFlags() |
This code:
1 formResults = { ... };
2 console.log("first name: " + formResults.firstName);
3 console.log("last name: " + formResults.lastName);
4 console.log("email: " + formResults);
has the following output:
import { useRef } from "react"; | |
/** | |
* Use this hook to quickly answer the question: Why did my useEffect or useMemo | |
* callback run again? | |
* | |
* Usage: | |
* | |
* // If you have this code... | |
* useEffect(() => { |
set -e | |
verbose() { | |
echo $ "$@" >&2 | |
"$@" | |
} | |
COMPARISON="${1:-origin/prod...origin/main}" | |
OUT=".git/changelog.out.html" |