Skip to content

Instantly share code, notes, and snippets.

@WebDevSimplified
WebDevSimplified / bootstrap-breakpoint.css
Last active April 23, 2024 22:48
This stylesheet adds text describing the current Bootstrap Breakpoint in the top right corner of the screen.
body {
margin-top: 40px; /* This margin just makes the text easier to read. You can remove it if you want since it can mess with your other styles. */
}
body::before {
content: "XS";
color: red;
font-size: 2rem;
font-weight: bold;
position: fixed;
@fnky
fnky / ANSI.md
Last active April 23, 2024 22:45
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@disintegrator
disintegrator / https-during-dev.macos.sh
Last active April 23, 2024 22:41
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
brew install caddy mkcert nss dnsmasq
mkcert -install
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {
@BigNerd
BigNerd / k9s.txt
Last active April 23, 2024 22:41
K9s column descriptions
View: Pods(<namespace>)[number of pods listed]
NAME pod name
READY number of pods in ready state / number of pods to be in ready state
RESTARTS number of times the pod has been restarted so far
STATUS state of the pod life cycle, such as Running | ... | Completed
CPU current CPU usage, unit is milli-vCPU
MEM current main memory usage, unit is MiB
%CPU/R current CPU usage as a percentage of what has been requested by the pod
%MEM/R current main memory usage as a percentage of what has been requested by the pod
@yuderekyu
yuderekyu / spacemacs-cheshe.md
Last active April 23, 2024 22:40 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@jrelo
jrelo / gcc-security.txt
Last active April 23, 2024 22:38
GCC security related flags reference.
Source material:
http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c
https://wiki.gentoo.org/wiki/Hardened_Gentoo
https://wiki.debian.org/Hardening
================================================================================================================>
GCC Security related flags and options:
CFLAGS="-fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-z,now -Wl,-z,relro"
@DewaldDeJager
DewaldDeJager / README.md
Last active April 23, 2024 22:38
Easy GitHub workflow for keeping a fork in sync with upstream

Sync Fork

This workflow uses the GitHub CLI to keep a forked repo in sync with the upstream repo. Add it to your repo as .github/workflows/sync-fork.yaml.

It runs daily to sync the default branch and can be triggered manually for any branch.

@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active April 23, 2024 22:36
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@sylumer
sylumer / shortcuts_from_drafts.js
Created December 31, 2022 19:25
Functions for calling Shortcuts on the Mac via a shell command
// Run a shortcut and return the result
function shortcutRun(p_strShortcutName, p_strShortcutInput)
{
// Define the script to run
let objShell = ShellScript.create(`#!/bin/zsh
echo "${p_strShortcutInput}" | shortcuts run "${p_strShortcutName}" | tee`);
// Run the script and return the result or write out any error to the log.
if (objShell.execute()) return objShell.standardOutput;
else