Skip to content

Instantly share code, notes, and snippets.

View briantully's full-sized avatar

Brian Tully briantully

View GitHub Profile
@briantully
briantully / z.md
Last active March 12, 2020 17:51 — forked from mischah/z.md
Installing und initializing z (https://github.com/rupa/z) with help of Homebrew.

#The power of z

Do you spend lots of time doing things like this?

cd this/is/the/path/that/i/want/so/i/type/it/all/out/to/get/whereiwant

With z, you could just do this:

@briantully
briantully / boost-low-pri-macOS.sh
Created October 25, 2019 17:28 — forked from mayankk2308/boost-low-pri-macOS.sh
Boost Low-Priority Tasks on macOS
# Useful for improving Time Machine backup prep. times, Mac App Store install speeds, etc.
sudo sysctl debug.lowpri_throttle_enabled=0
# To restore defaults
sudo sysctl debug.lowpri_throttle_enabled=1
@briantully
briantully / locustfile.py
Created September 12, 2019 23:23 — forked from yamionp/locustfile.py
Websocket Locust Sample. locustfile and Echo/Chat Server
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import json
import uuid
import time
import gevent
@briantully
briantully / drupal-quick-dump.sh
Created May 1, 2019 15:06 — forked from webbj74/drupal-quick-dump.sh
Script to dump Drupal database structure, but exclude data from massive/unneeded tables.
#!/bin/bash
# usage: drupal-quick-dump user host database
USER="$1"
HOST="$2"
DB="$3"
DATE=`date +%Y%m%d`
# Get User Password
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:"
<?php
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\DrupalKernel;
$autoload = require __DIR__ . '/vendor/autoload.php';
$cwd = getcwd();
chdir('docroot');
$drupalKernel = DrupalKernel::createFromRequest(
@briantully
briantully / for-snook.md
Created December 16, 2018 04:59 — forked from threepointone/for-snook.md
For Snook

https://twitter.com/snookca/status/1073299331262889984?s=21

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.

@briantully
briantully / lightning_sub_profile.info.yml
Created November 13, 2018 15:32 — forked from balsama/lightning_sub_profile.info.yml
Sample Lightning sub-profile info file.
name: 'Lightning sub-profile'
type: profile
version: 8.x-dev
description: 'Sub-profile of Lightning'
core: '8.x'
themes:
- bartik
- seven
@briantully
briantully / git-overlap.sh
Created August 13, 2018 14:08 — forked from swichers/gist:bbc28deabd76ad25f09c186b09c128a8
Checks for shared file modifications within a commit range
#!/usr/bin/env bash
#
# Checks the configured commit range to determine which commits modify files
# that were modified in an earlier commit.
#
# Example:
# Commit 1:
# foo.txt
# bar.txt
# Commit 2:
@briantully
briantully / jsonapi.vcl
Created August 1, 2018 23:51 — forked from swichers/jsonapi.vcl
Varnish VCL for checking authorization against a different page and then forcing a cached response.
vcl 4.0;
# !!Important!! Do not use this if your authenticated response can vary
# between users or roles.
# Note: This is only useful if the following things are true:
# * Access to the jsonapi endpoints is restricted to authorized users only.
# * jsonapi request results will be the same for all authorized users. No
# customized or filtered results based on role or other access checks.
@briantully
briantully / memcache.php
Created July 26, 2018 21:15
Acquia D8 Memcache Sample Configuration
/**
* @file
* Example implementation of ACSF post-settings-php hook.
*
* @see https://docs.acquia.com/site-factory/tiers/paas/workflow/hooks
*/
// The path to this file should be docroot/factory-hooks/post-settings-php/memcache.php
// Use ACSF internal settings site flag to apply memcache settings.