Skip to content

Instantly share code, notes, and snippets.

@welly
welly / gist:c1210457dc32f56d8a1c9b23fb451354
Created November 20, 2017 17:49
fb cli tool for docker4drupal projects
#!/usr/bin/env bash
# Console colors
red='\033[0;91m'
red_bg='\033[101m'
yellow_bg='\033[43m'
green='\033[0;32m'
green_bg='\033[42m'
yellow='\033[1;33m'
NC='\033[0m'
Verifying my Blockstack ID is secured with the address 1N7pRXjaxxyrGfJbkXAuo9YS7MTwUwVeYZ https://explorer.blockstack.org/address/1N7pRXjaxxyrGfJbkXAuo9YS7MTwUwVeYZ
@welly
welly / settings.local.php
Created December 13, 2017 12:26
Local developer settings.php for Drupal 8
<?php
$databases['default']['default'] = array (
'database' => 'drupal',
'username' => 'drupal',
'password' => 'drupal',
'host' => 'mariadb',
'port' => '3306',
'driver' => 'mysql',
'prefix' => '',
@welly
welly / local.services.yml
Created December 13, 2017 12:28
Local development services.yml for Drupal 8
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
### Keybase proof
I hereby claim:
* I am welly on github.
* I am welly (https://keybase.io/welly) on keybase.
* I have a public key ASBeQJLxjeQ1R-Fy1Tu-_nFha_FHXXJZi0XEh8QPSVfP-wo
To claim this, I am signing this object:
@welly
welly / docker_for_mac_disk_default_size.md
Created December 17, 2018 12:12 — forked from stefanfoulis/docker_for_mac_disk_default_size.md
How to resize Docker for Mac Disk image and set the default size for new images

Set the default size for new Docker for Mac disk images

UPDATE: The instructions here are no longer necessary! Resizing the disk image is now possible right from the UI since Docker for Mac Version 17.12.0-ce-mac49 (21995).

If you are getting the error: No space left on device

Configuring the qcow2 size cap is possible in the current versions:

# my disk is currently 64GiB
@welly
welly / prepare-commit-msg
Created February 12, 2019 11:33
Prepend git commit messages with branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@welly
welly / gist:380539d63e1517c52628f9d5dbb1e8a4
Created February 12, 2019 15:22
Drupal 8: Embedding a view using a render array
$build['view'] = [
'#type' => 'view',
'#name' => 'hero_image',
'#display_id' => 'block_1',
'#arguments' => [
107793,
],
];
@welly
welly / gist:5d0caf2c3d7fe459c4d147f92f8d1254
Created June 29, 2020 12:31
Default Ender 3/Cura start g-code
; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
G28 ; Home all axes
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
lando drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name in ('search_api_views_taxonomy');"