Skip to content

Instantly share code, notes, and snippets.

View fubarhouse's full-sized avatar
🏠
Working from the greatest office on earth

Karl Hepworth fubarhouse

🏠
Working from the greatest office on earth
  • Canberra, Australia
View GitHub Profile
@fubarhouse
fubarhouse / 320_and_up.md
Last active December 15, 2016 02:43
Drupal IE support for responsive styles.
From https://www.drupal.org/node/1322794#comment-5630610
/* template.php */

function mytheme_preprocess_html(&$vars) {
  css_320_and_up($vars);
}
@fubarhouse
fubarhouse / gist:8a615a2626b2627c259bde6cfb74f6be
Created October 6, 2017 11:30
A working Drupal 7 composer.json build file
{
"name": "mynamespace/myproject",
"description": "Composer file example",
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/7/"
},
{
"type": "package",
@fubarhouse
fubarhouse / loop_files_folders_recursively.go
Last active January 2, 2023 10:31 — forked from francoishill/loop_files_folders_recursively.go
Loop through files and folders recursively in golang
package main
import (
"fmt"
"os"
"path/filepath"
)
func run() ([]string, error) {
searchDir := "c:/path/to/dir"

Keybase proof

I hereby claim:

  • I am fubarhouse on github.
  • I am fubarhouse (https://keybase.io/fubarhouse) on keybase.
  • I have a public key whose fingerprint is 1AB4 7DF3 80B2 9A08 A106 C455 2C6D 140D 87C0 E0A2

To claim this, I am signing this object:

@fubarhouse
fubarhouse / addmore.module
Last active February 20, 2018 03:34 — forked from AlexSkrypnyk/mymodule.css
Multiple field API example including add/remove submit and callback functions.
<?php
/**
* @file
* Module file for add_more_example.
*/
/**
* Implements hook_menu().
*
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<img src="https://img.shields.io/badge/🔥-Blazing%20Fast-red.svg"/>
<img src="https://img.shields.io/badge/😿-For Humans-blue.svg"/>
@fubarhouse
fubarhouse / test-ansible-role.sh
Created May 28, 2018 20:21 — forked from samdoran/test-ansible-role.sh
Script for testing an Ansible role in containers
#!/bin/bash
# Test Ansile role inside container
#
# Inspired by the wonderful work of Jeff Geerling (@geerlingguy)
# https://gist.github.com/geerlingguy/73ef1e5ee45d8694570f334be385e181
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NEUTRAL='\033[0m'
@fubarhouse
fubarhouse / mbp2011-disable-amd-gpu.md
Created September 17, 2018 21:26 — forked from blackgate/mbp2011-disable-amd-gpu.md
Macbook Pro 2011 - Disable AMD GPU
#!/bin/bash
# Database importer.
#
# Used with the govCMS scaffolding projects by Department of Finance.
# Created independently of the Department of Finance by Karl Hepworth.
# @fubarhouse / karl.hepworth@gmail.com
#
# Pass one argument to this script to provide the path or drush alias
# for either syncing or importing from a sql file. This should ideally
@fubarhouse
fubarhouse / useful-snippets-bash.txt
Created March 21, 2019 05:38
Useful thingies...
get-content .\db.sql | docker-compose exec -T test bash -c 'drush sql-cli'