Skip to content

Instantly share code, notes, and snippets.

View thejimbirch's full-sized avatar

Jim Birch thejimbirch

View GitHub Profile
@sean-e-dietrich
sean-e-dietrich / contrib
Created June 21, 2019 21:18
Contrib Command For Docksal
#!/bin/bash
NAME=$1
VERSION=${2:-8.8.x}
if [[ -z "${NAME}" ]]; then
NAME=$(uuidgen)
fi
if [[ -d $NAME ]]; then
@mortenson
mortenson / metatag_example.php
Created February 26, 2019 23:29
OR statements in metatags...
<?php
/**
* Implements hook_metatags_attachments_alter().
*
* This function allows you to define fallback tokens in case a field is empty.
*
* If all fallback values are empty, the tag will be empty.
*
* Example: [node:field_image:medium]||[node:field_legacy_image:medium]||/fallback.png
@zachleat
zachleat / rwdurl
Last active February 5, 2019 02:20
A command line utility to open a url with a bunch of different screen widths (and organize the windows).
# My Chrome developer profile is in the `Profile 1` directory, make sure to update with yours.
# Best on an ultra wide monitor.
function rwdurl() {
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(0,0);window.resizeTo(320,1395);window.location='$1';</script></body></html>"
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(330,0);window.resizeTo(480,1395);window.location='$1';</script></body></html>"
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(815,0);window.resizeTo(640,1395);window.location='$1';</script></body></html>"
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(1460,0);window.resizeTo(800,1395);window.location='$1';</script></body></html>"
open -n
@danielwrobert
danielwrobert / .editorconfig
Last active April 19, 2018 14:37
My personal preferences for my EditorConfig file when working on a WordPress project. I save these contents to a .editorconfig file in my project's root directory. If you're not familiar with EditorConfig, you should check it out, it's pretty awesome - http://editorconfig.org/
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
/*
Op Stack - Yancy Way 2014
Requires HYPE.pde
*/
float a, b, m, n1, n2, n3, radius;
float theta;
float r1, r2, r3, r4, r5, r6;
/*
* Alt Wave
* by Yancy Way (Echophon) - twitter.com/echophons - echophon.tumblr.com
*/
//requires HYPE.pde (staging)
//requires HOrbiter
void setup() {
/*
* Hex Melange
* by Yancy Way (Echophon) - twitter.com/echophons - echophon.tumblr.com
*/
//requires HYPE.pde (staging)
HDrawablePool pool;
HColorPool colors;
/*
* Probably Dots
* by Yancy Way (Echophon) - twitter.com/echophons - echophon.tumblr.com
*/
//requires HYPE.pde (staging)
HDrawablePool pool;
void probSize(HDrawable d, float x, float y){
/*
Gyre Undulation - Yancy Way 2014
Requires HYPE.pde
Requires HOrbiter.pde
*/
HDrawablePool pool;
HColorPool colors;
HCanvas canvas;