Skip to content

Instantly share code, notes, and snippets.

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 / 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
@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.
# 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 / 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 \

@ckng
ckng / .gitignore
Last active October 4, 2023 14:20
Drupal 8/9/10 .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 / seed_derivatives.drush.inc
Created August 26, 2016 14:18 — forked from typhonius/seed_derivatives.drush.inc
This script can generate image derivatives for Drupal for warming up the filesystem prior to going live. Image derivative generation puts an amount of load on the servers so it images have been migrated from another server with no derivatives, it may be useful to pre-generate using this script.
<?php
/**
* Implements hook_drush_command().
*/
function seed_derivatives_drush_command() {
$items = array();
$items['seed_derivatives'] = array(
'description' => "Create image derivatives",
@ckng
ckng / ubuntu-configure-sendmail-with-gmail
Created August 10, 2016 23:40 — forked from sshtmc/ubuntu-configure-sendmail-with-gmail
Ubuntu sendmail using smtp.gmail.com
#!/bin/bash
HOST=$(hostname)
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
@ckng
ckng / swap-check.sh
Created November 2, 2015 13:31
Ubuntu: Check swap space usage by processes
#!/bin/bash
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n
@ckng
ckng / Preferences.sublime-settings
Last active October 8, 2015 03:58
Drupal Sublime Text user config
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by file type specific settings.
{
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"font_size": 12,
"ignored_packages":
[
"Vintage"