Skip to content

Instantly share code, notes, and snippets.

@ckng
ckng / .gitignore
Last active March 24, 2025 08:47
Drupal 8/9/10/11 .gitignore (/web docroot)
# This file contains .gitignore rules that are often used with Drupal projects.
# Because .gitignore is specific to your site and its deployment processes, you
# may need to uncomment, add, or remove rules.
# Pantheon commits a settings.php for environment-specific settings.
# Place local settings in settings.local.php
/web/sites/*/settings.local.php
/web/sites/*/settings.ddev.php
/web/sites/*/services*.yml
!/web/sites/*/services.pantheon.*.yml
@ckng
ckng / gist:467b69cc8016de4a44846b47ef18859d
Created June 9, 2017 07:15 — forked from reidransom/gist:6042016
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/>
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
acrobat
africa
alaska
albert
albino
album
alcohol
@ckng
ckng / .gitignore
Last active August 4, 2021 13:58
Drupal 8 .gitignore
# Ignore directories generated by Composer
/drush/contrib/
/vendor/
core/
modules/contrib/
themes/contrib/
profiles/contrib/
libraries/
# Ignore paths that contain user-generated content.
@ckng
ckng / README.md
Last active November 26, 2019 13:07
Theme SCSS to CSS preprocessing (gulp 4)

For dev

  • to build, same as $ gulp build. Includes clean, sourcemap, SASS compilation, autoprefixer.
$ gulp
  • to watch changes and compile
$ gulp watch
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
@ckng
ckng / gist:5a533fcb7334fb60cbad3a17708fcac4
Last active February 23, 2025 15:10
Ubuntu - Purge old kernels
uname -a
dpkg --list | egrep -i --color 'linux-image|linux-headers|linux-modules' | awk '{ print $2 }' > kernels.txt
grep -v $(uname -r) kernels.txt > kernels_to_delete.txt
# Verify current kernal version is not in the list
grep $(uname -r) kernels_to_delete.txt
cat kernels_to_delete.txt | xargs sudo apt purge -y
sudo apt autoremove
@ckng
ckng / docker-pruner.sh
Last active February 23, 2025 15:56 — forked from fayak/docker-pruner.sh
Docker pruner. Deletes docker's overlay2 leftovers that survive 'docker system prune -af --volumes'
#!/usr/bin/env bash
set -eEuo pipefail
MARKER_FILE_NAME="${DOCKER_PRUNER_MARKER:-DOCKER-PRUNER-MARKER-FILE}"
DOCKER_PATH="${DOCKER_PATH:-/var/lib/docker/overlay2}"
function _used_dirs() {
for docker_obj in $(docker ps -aq) $(docker image ls -aq); do
lowerdir="$(docker inspect "$docker_obj" | jq '.[].GraphDriver.Data.LowerDir' -r)"
@ckng
ckng / llms.txt
Created May 3, 2025 17:23
Astro 5 docs llms.txt
This file has been truncated, but you can view the full file.
Directory Structure:
└── ./
├── src
│ └── content
│ └── docs
│ └── en
│ ├── basics
│ │ ├── astro-components.mdx
│ │ ├── astro-pages.mdx
@ckng
ckng / llms.txt
Created May 3, 2025 17:27
Tailwind 4.1 docs llms.txt
This file has been truncated, but you can view the full file.
Directory Structure:
└── ./
└── src
└── docs
├── accent-color.mdx
├── adding-custom-styles.mdx
├── align-content.mdx
├── align-items.mdx
├── align-self.mdx