Skip to content

Instantly share code, notes, and snippets.

View cleverington's full-sized avatar

Charles Leverington cleverington

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@eduardozulian
eduardozulian / wp-taxonomy-dropdown.php
Last active May 5, 2024 14:45
Callback function for 'meta_box_cb' argument inside register_taxonomy() that replaces the regular checkboxes with a plain dropdown list
<?php
/**
* Callback function for taxonomy meta boxes
*
* A simple callback function for 'meta_box_cb' argument
* inside register_taxonomy() that replaces the regular
* checkboxes with a plain dropdown list
*
* @param [type] $post [description]
* @param [type] $box [description]
#!/usr/bin/env bash
# Checkout a local branch and build a Pantheon multi-dev environment from it.
set -e
# Load variables.
source "$(dirname "$0")/_vars"
# Clean up the build.
cleanup() {
if [[ -d ${RELEASE_DIRECTORY} && ${RELEASE_DIRECTORY} == *"pantheon"* && -d ${CURRENT_DIRECTORY} && ! -z ${GIT_CURRENT_BRANCH} ]]; then
#!/usr/bin/env sh
set -e
# Load variables.
source "$(dirname $0)/_vars"
usage() {
echo "Build the application."
echo " "
echo "./scripts/docker/build [options]"
@mburakerman
mburakerman / package.json
Last active September 26, 2022 17:32
Webpack 4 config.js (SCSS to CSS and Babel) 👌 The Simplest Usage 👌
{
"name": "webpack-sass",
"version": "1.0.0",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack -p"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
#!/bin/bash
#######
# This script assumes that you have composer and drush installed.
# Be sure to change the directory location and database credentials below.
#
# Place this file in your home directory or web root. Make it executable.
# To run, open Terminal and:
# > cd ~
# > ./drupal8.sh
#!/bin/bash
#####
# Copy to yopur home directory or web root and make executable.
#
# Run all tests for a module:
# > ./test.sh [name_of_module]
#
# Run a specific test class.
# > ./test.sh node Drupal\\Tests\\node\\Functional\\NodeAccessLanguageFallbackTest
@MatthieuScarset
MatthieuScarset / .lando.yml
Last active January 4, 2024 15:03
Correct settings for XDebug + VSCode + Lando (+3.0)
# Lando version is at least +3.0
name: drupal-nine
recipe: drupal9
services:
appserver:
webroot: web
xdebug: debug
config:
php: .vscode/php.ini
<?php
define('WP_CACHE', 1); // Added by WP Rocket
/**
* The base configuration for WordPress, modified to work in both server and
* local development environments with WP Engine.
*
* The WP Engine configuration adheres to the well-known 12-Factor App principles
* of "Store config in the environment" (https://12factor.net/config) and
* "Dev/Prod Parity" (https://12factor.net/dev-prod-parity). This means you should
* use the same files and test environments on laptops as well as servers, and