Skip to content

Instantly share code, notes, and snippets.

@agokrani
agokrani / claude-code-prompt.txt
Last active April 7, 2026 22:36
Claude Code System Prompt
'system':
[
{
'type': 'text',
'text': "You are Claude Code, Anthropic's official CLI for Claude.",
'cache_control': {'type': 'ephemeral'}
},
{
'type': 'text',
'text': 'You are an interactive CLI tool that helps users with software engineering tasks.

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 8, 2026 16:29
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 😺

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 10, 2026 10:23
set -e, -u, -o, -x pipefail explanation
@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 ),
@numberwhun
numberwhun / OpenSSH Config File Examples
Created October 17, 2016 00:40
OpenSSH Config File Examples
Taken from: http://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/
System-wide SSH client configuration files
/etc/ssh/ssh_config : This files set the default configuration for all users of OpenSSH clients on that desktop/laptop and it must be readable by all users on the system.
User-specific SSH client configuration files
~/.ssh/config or $HOME/.ssh/config : This is user’s own configuration file which, overrides the settings in the global client configuration file, /etc/ssh/ssh_config.
~/.ssh/config file rules
@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,