Skip to content

Instantly share code, notes, and snippets.

@lynaghk
lynaghk / elisp.el
Created March 29, 2024 08:22
Copy markdown from Emacs, paste formatted content directly into GMail
(defun formatted-copy ()
"Export region to HTML, and copy it to the clipboard."
(interactive)
(save-window-excursion
(let* ((buf (org-export-to-buffer 'html "*Formatted Copy*" nil nil t t))
(html (with-current-buffer buf (buffer-string))))
(with-current-buffer buf
(shell-command-on-region
(point-min)
(point-max)
@gruber
gruber / Split Tabs to New Window.scpt
Last active May 5, 2024 16:58
An AppleScript for Safari to move all tabs in the frontmost window, from the current tab to the rightmost (last) tab, to a new window.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
(*
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window)
Much more elegant version: Leon Cowle (https://github.com/leoncowle)
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865
Worth a warning: "moving" tabs with this script doesn't actually move them like
drag-and-drop does. The tabs "moved" by this script will reload in the new window,
@GetVladimir
GetVladimir / Setup-iCloud+-Custom-Domain-Catch-All-email-with-Gmail.md
Last active May 6, 2024 08:12
How to setup iCloud+ Custom Domain Catch All email with Gmail

How to setup iCloud+ Custom Domain Catch All email with Gmail

I've recently tested on how to move the custom domain catch all email from G Suite to the new iCloud+ Catch All feature and wanted to share my experience.

The end result is having Custom Domain email and Catch All routing, that can be fully used via Gmail, including receiving and sending emails.


The steps

  • Setup your Custom Domain (or subdomain) with iCloud+
@chockenberry
chockenberry / README
Created April 6, 2022 17:32
A simple AppleScript to start up a web server in the folder where the script is located.
1) Add this code to a new file in Script Editor
2) Export the script as "Application" and make sure it's code signed
3) Put "Startup.app" in the root folder of the test website (e.g. where index.html is located)
4) Make sure that "Startup.app" has Full Disk Access in System Preferences > Security & Privacy > Privacy
@azlen
azlen / bulletpaths.js
Last active April 15, 2024 14:06
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
/*
* Viktor's Roam Mobile Long tap to Exluce Filters and Right click on bullets + pages + title
* version: 0.3
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
/*
* Viktor's Roam Mobile Double tap to Exluce Filters and Right click on bullets
* version: 0.2
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
@rodchristiansen
rodchristiansen / Uninstall Soundflower in macOS Catalina
Created June 27, 2020 20:22
Script to remove Soundflower audio driver from macOS Catalina 10.15+
#!/bin/bash
# Clears the SIP protected folder where Soundflower will be loaded by the system
sudo kextcache --clear-staging
if [ -d /Library/Extensions/Soundflower.kext ]; then
sudo kextunload -q /Library/Extensions/Soundflower.kext
sudo rm -rf /Library/Extensions/Soundflower.kext
fi
@ciceronianus
ciceronianus / Roam-youtube-resizer.css
Last active June 5, 2020 22:41
Roam - make Youtube video larger by @CatoMinor3
/* How to use: Simply put #make:yt-large infront of {{youtube: }} */
[data-tag*="make:yt-large"] ~ div iframe
{
width: 700px;
height: 400px;
}