Skip to content

Instantly share code, notes, and snippets.

View elazar's full-sized avatar

Matthew Turland elazar

View GitHub Profile
@nickistre
nickistre / PHPUnitHTMLCheck.php
Last active July 20, 2020 21:32
PHPUnit snippet for checking if a string is valid HTML using DOMDocument at a basic level.
protected function checkHTML($body)
{
libxml_use_internal_errors(true);
$dom = new \DOMDocument();
$dom->loadHTML($body, LIBXML_HTML_NOIMPLIED + LIBXML_HTML_NODEFDTD);
// Check for no errors
$this->assertCount(0, libxml_get_errors());
// Check for doctype

So @everyone -- I think I'm ready for tonight. Spent, as usual, what feels like too much time. But given that I knew the source material, and literally had made the maps myself, that went better. I wanted to share a few thigns though, because it was the lighting that threw me again. And I think I've grokked (many) of the gotchas. Putting this here for myself in the future as much as y'all:

  1. Advanced lighting, in fact, doesn't seem to support dim light at the moment. Which lead me for this encounter to want to go back to the old lighting.

1.a) As a note: When doing advanced lighting, you turn it on via the 'Dynamic Lighting' tab on the page. This is not ALL dynamic lighting, just advanced. Once turned on, the visuals for the characters are controlled by the similarly matching "Dynamic Lighting" tab on each character/token. Only those settings matter.

1.b) ALSO: (the main reason I went 'old' for this one), is that there seems to be an issue with the new lighting, where instead of looking a

@nickistre
nickistre / docker-reset-full-single-line.sh
Last active July 24, 2023 22:45
Reset Docker environment
#!/usr/bin/env bash
# All in one line
docker stop $(docker ps -q) ; docker rm $(docker ps -aq) ; docker rmi -f $(docker images -q) ; docker volume prune -f ; docker network prune -f ; docker system prune -a --volumes -f
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 20, 2024 05:29
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@mheap
mheap / stop.js
Last active December 15, 2017 16:48
// Sign up for nexmo.com
// Purchase a number
// Set the webhook URL for inbound messages (https://dashboard.nexmo.com/settings) to be yourdomain.com:3000/webhooks/sms-inbound
// Fill in the Twitter credentials below (you'll need to register an application at https://apps.twitter.com)
// Run this code
// Send STOP to the number you created
// Watch as @rosstuck gets a tweet asking him to stop
const app = require('express')()
const bodyParser = require('body-parser')
@DragonBe
DragonBe / php_conferences_2016.md
Last active February 9, 2018 08:02
Overview of PHP oriented conferences in 2016 (excluding polyglot and framework oriented conferences)
@shadowhand
shadowhand / git-affecting
Last active August 29, 2015 14:25
Git branches affecting a file
#!/bin/bash
# git-affecting
# @link https://gist.github.com/shadowhand/130dbcf6d9b01877797b
# @author shadowhand https://github.com/shadowhand
# @license MIT
#
# installation:
# save this file as git-affecting somewhere in your $PATH
# make it executable: chmod +x git-affecting
@tswicegood
tswicegood / environment.yml
Last active November 17, 2021 23:22
Simple scraper for looking through a bunch of saved Craigslist listings for a phone number
# Conda environment file -- these packages are required for this script to work
name: craigslist
dependencies:
- lxml
- pip
- python=3.4*
- requests
- pip:
- aiohttp
- pyquery
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.