Skip to content

Instantly share code, notes, and snippets.

@danfoust
danfoust / launch.json | with npm script
Created April 13, 2022 01:27
Serverless Offline launch.json for breakpoints
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Serverless Offline",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/backend",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "debug"]
@danfoust
danfoust / Dockerfile
Created October 27, 2024 17:53
Local Ansible - Vagrant with Docker Provider
##############################################################################################
# This helps unblock me on following a long with materials for learning Ansible and Kubernetes
# locally, which rely on a VM service.
#
# I did not want to use VirtualBox, because on Linux it requires tainting the kernel. I also
# already have Docker installed and it's said to have better performance/less overhead.
#
# This Dockerfile will setup an Ubuntu container and configure it to support SSH, which is
# required for testing Ansible locally with Vagrant.
#
@danfoust
danfoust / .aliases
Last active December 22, 2024 15:40
Useful shell aliases
# Copy last command
alias copy_last_cmd="fc -ln -1 | tr -d '\n' | xclip -selection clipboard"
# Disk usage
alias usage='du -ch | grep total'
# Permissions
alias perm='stat -c "%a %n" *'
# Print $PATH entries on newlines
@danfoust
danfoust / gist:0a85eca3fe71e69ecfeb1851fb7d5fb6
Created February 23, 2025 19:23
uBlock Origin - Hide search results by domain
# Desktop
www.google.com##div[class="g"]:has(a[href*="example.com"])
# Mobile
www.google.com##div[lang="en"]:has(a[href*="example.com"])