Skip to content

Instantly share code, notes, and snippets.

View geerlingguy's full-sized avatar
:shipit:
Tea, Earl Grey, hot.

Jeff Geerling geerlingguy

:shipit:
Tea, Earl Grey, hot.
View GitHub Profile
# In YAML, this...
something:
- { name: test.example }
# ...is the same as this:
something:
- name: test.example
# And this:
something:
@geerlingguy
geerlingguy / dashcam-time-lapse.sh
Last active August 10, 2023 06:06
Create a time lapse video from a set of real-time dash cam clips.
#!/bin/bash
#
# Batch Time-Lapse creation script.
#
# This script can be used to speed up, trim, and finally concatenate tens or
# even hundreds of video clips, e.g. from a dash cam. You can do other things,
# too, but the main things this script does include:
#
# 1. Copy across and speed up video clips from an input dir to an output dir.
# 2. Trim off the first x frames of each of the copied/sped up clips.
#!/bin/bash
#
# Add a commit and push to origin for each 'geerlingguy.*'' Ansible role.
message="Remove sudo requirement from Travis build."
# Loop through all directories starting with "geerlingguy".
for dir in ./geerlingguy*/
do
# cd into role directory.
@geerlingguy
geerlingguy / pix_migrate.install.php
Last active October 3, 2016 01:53
Example of hook_uninstall() for migration-related module.
<?php
/**
* @file
* Pix migration install file.
*/
/**
* Implements hook_uninstall().
*/
 10:51 PM:~/Dropbox/VMs/packer/ubuntu1604 $ vagrant up vmware --debug --provider=vmware_fusion | tee | pbcopy
INFO global: Vagrant version: 1.8.6
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_NVM_CD_FLAGS=""
INFO global: VAGRANT_OLD_ENV___CF_USER_TEXT_ENCODING="0x1F6:0x0:0x0"
INFO global: VAGRANT_OLD_ENV_LSCOLORS="ExFxCxDxBxegedabagacad"
INFO global: VAGRANT_OLD_ENV_XPC_SERVICE_NAME="0"
INFO global: VAGRANT_OLD_ENV_SHLVL="1"
INFO global: VAGRANT_OLD_ENV_LOGNAME="jeff.geerling"
@geerlingguy
geerlingguy / build.xml
Last active April 11, 2017 18:27
build.xml file to support Config Split in BLT.
<project name="custom" default="build">
<!-- Override setup:update task for config import. -->
<target name="setup:update" description="Update current database to reflect the state of the Drupal file system.">
<!-- enable_property and uninstall_property must be set at this time. -->
<phingcall target="setup:toggle-modules"/>
<!-- Execute db updates. -->
<drush command="updb" assume="yes" alias="${drush.alias}">
@geerlingguy
geerlingguy / project.yml
Created February 15, 2017 04:55
BLT project.yml - disable all BLT's module handling
...
modules:
local:
enable: { }
uninstall: { }
ci:
enable: { }
uninstall: { }
dev:
enable: { }
@geerlingguy
geerlingguy / ansible-role-test.sh
Last active January 18, 2024 17:37
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
@geerlingguy
geerlingguy / ansible-container-debug.json
Created June 30, 2017 05:19
ansible-container debug info
Ansible Container, version 0.9.1
Darwin, JJG-MBP, 16.6.0, Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64, x86_64
2.7.13 (default, Dec 18 2016, 07:03:39)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] /usr/local/opt/python/bin/python2.7
{
"ContainersPaused": 0,
"Labels": null,
"CgroupDriver": "cgroupfs",
"ContainersRunning": 2,
"ContainerdCommit": {
Ansible Container, version 0.9.2rc0
Darwin, JJG-MBP, 16.6.0, Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64, x86_64
2.7.13 (default, Dec 18 2016, 07:03:39)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] /usr/local/opt/python/bin/python2.7
{
"ContainersPaused": 0,
"Labels": null,
"CgroupDriver": "cgroupfs",
"ContainersRunning": 0,
"ContainerdCommit": {