Skip to content

Instantly share code, notes, and snippets.

Avatar

Lisa Ridley lhridley

  • Chattanooga, Tennessee
View GitHub Profile
@keeferrourke
keeferrourke / install-google-fonts.sh
Last active Feb 9, 2022
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
View install-google-fonts.sh
#!/bin/sh
# Written by: Keefer Rourke <https://krourke.org>
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git>
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git
srcdir="/tmp/google-fonts"
pkgdir="/usr/share/fonts/truetype/google-fonts"
giturl="git://github.com/google/fonts.git"
View Taxonomy term UUID filter
<?php
namespace Drupal\djr_views\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;
use Drupal\taxonomy\Entity\Term;
use Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid;
use Drupal\views\Plugin\views\filter\InOperator;
/**
@remarkablemark
remarkablemark / Dockerfile
Last active Sep 6, 2022
Install node and npm with nvm using Docker.
View Dockerfile
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
View UnicodeUtils.php
<?php
/**
* A utility class to clean up common problems with UTF-8 strings.
*/
class UnicodeUtils{
/**
* Maps double-encoded UTF-8 byte sequences back to single encoded UTF-8. The keys are byte sequences where a valid
* UTF-8 character has been interpreted as multiple characters in CP1252, and then re-converted