Skip to content

Instantly share code, notes, and snippets.

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
@OrionReed
OrionReed / dom3d.js
Last active April 19, 2025 12:06
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@douglascayers
douglascayers / docker-destroy.sh
Last active April 3, 2024 16:19
🗑 Delete all docker services, containers, images, and volumes
#!/usr/bin/env zsh
# Exit when any command fails
set -e
# https://docs.docker.com/engine/reference/commandline
SCRIPT_NAME=$(basename ${0})
DELETE_BUILDER_CACHE=0
@matt-newell
matt-newell / README.md
Last active June 28, 2019 16:08
Validate Visualforce domain is ready

VALIDATE VISUALFORCE DOMAIN IS READY

Have you ever created a new scratch org with sfdx but seem to have trouble access visualforce pages? This seems to be a know issue and can take 0-18 minutes before the org is fully operational. This random delay can cause havoc on e2e/integration testing as well as unit test. So after many attempts to fix or delay CI/CD I believe I have finally found a solution.

First let's talk about the actual issue, spinning up a new scratch org. After running sfdx force:org:create you will receive a success message along with login/password info for your org. The core sfdc features of the org are almost ready instantly but if you have a managed package with namespace it takes 0-18 minutes. Navigating to one of these pages(vf pages) will not error with a 404 nor will they timeout. However it will load a blank screen so let's dig in a bit 😺

@pseudokool
pseudokool / desktop-mode-ubuntu-aws-ec2.markdown
Created September 11, 2018 17:05
Desktop (GUI) mode for Ubuntu 16.04 on AWS EC2

Ubuntu 16.04 on AWS EC2

This guide enables desktop mode in Ubuntu 16.04 (Xenial Xerus) running off an AWS EC2.

Setup

  • Launch an EC2 instance with Ubuntu 16.04 (should work on all versions greater too)
  • Ensure a security group is configured, that allows ingress on ports 22 (SSH) and 5901 (VNC, 5900+N, where N is the display number)
  • SSH into the instance, update the system, install the XFCE desktop and the lightweight VNC server:
@douglascayers
douglascayers / ApexCsvExample.java
Created January 2, 2017 18:58
Apex CSV Example. Note the use of String.escapeCsv() method
String csv = 'Id,Name\n';
for ( List<Account> accts : [ SELECT id, name FROM Account LIMIT 10 ] ) {
for ( Account acct : accts ) {
csv += acct.id + ',' + acct.name.escapeCsv() + '\n';
}
}
ContentVersion file = new ContentVersion(
title = 'accounts.csv',
versionData = Blob.valueOf( csv ),
@afawcett
afawcett / CustomMetadataService.cls
Last active March 30, 2021 17:10
Custom Metadata POC for DLRS
/**
* Copyright (c) 2013, Andrew Fawcett
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
@dustinlarimer
dustinlarimer / keen.js
Created November 30, 2013 20:34
Keen.io page view drop-in
// Copy-paste from https://keen.io/docs/clients/javascript/usage-guide/#js-install-guide
var Keen=Keen ||{configure:function(e){this._cf=e},addEvent:function(e,t,n,i){this._eq=this._eq||[],this._eq.push([e,t,n,i])},setGlobalProperties:function(e){this._gp=e},onChartsReady:function(e){this._ocrq=this._ocrq||[],this._ocrq.push(e)}};(function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://":"http://")+"dc8na2hxrj29i.cloudfront.net/code/keen-2.1.0-min.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})();
// readKey is not required for this example
Keen.configure({
projectId: "your_project_id",
writeKey: "your_write_key",
readKey: "your_read_key"
});
@dustinlarimer
dustinlarimer / example.html
Last active December 26, 2015 11:39
Intro to JS kickoff session
<!DOCTYPE html>
<html>
<head>
<title>Intro to JavaScript!</title>
<style>
body {
background: #fbfbfb;
}
.container {
@trinitronx
trinitronx / truecrypt_fix.bash
Last active February 18, 2025 07:29 — forked from jimjh/truecrypt_fix.bash
Fixes annoying brew doctor messages caused by Truecrypt
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )