Skip to content

Instantly share code, notes, and snippets.

View gist:feb2227958cb398a4736290639e69632
actor frizzle
actor sakura
actor xiaoruan
actor yukito
actor toya
actor rika
actor teacher
database cake
View dym_demo.rb
#!/usr/bin/env ruby
versions = (3..7).map{ |minor| "2.#{minor}" }
versions.each do |version|
cmd = <<~HERE
$stdout.write "defined?(DidYouMean) == "
$stdout.write defined?(DidYouMean).inspect
$stdout.write "\\n"
$stdout.write "defined?(DidYouMean::Levenshtein) == "
austinpray / out.txt
Created Jul 9, 2020
parse props from structured loggin
View out.txt
{"query"=>"can contain spaces", "span"=>"1h"}
{"query"=>"can contain spaces", "span"=>"1h"}
{"query"=>"can contain spaces", "span"=>"1h"}
{"query"=>"can contain spaces", "span"=>"1h"}
{"query"=>"can contain spaces"}
{"query"=>"can contain spaces"}
{"query"=>"can contain spaces"}
View gist:5544f10ffdb28991cd8a72ecca09ac82
Balanced B (B-tier stupid and horny)
Balanced C (C-tier stupid and horny)
#### Balanced B (B-tier stupid and horny)
Nature | Value | Stat | Value
------ | --- | ---- | ---
**stupid** | 4 | **HP** | 60
View gist:2179301c3f7b3fa8e1ac62bf22aa7911
This file has been truncated, but you can view the full file.
Balanced F (F-tier stupid and horny)
Balanced S (S-tier stupid and horny)
#### Balanced F (F-tier stupid and horny)
Nature | Value | Stat | Value
------ | --- | ---- | ---
View composer.json
"repositories": [
"type": "package",
"package": {
"name": "zzzzz/no-trailing-comma",
"description": "Placeholder package for clean diffs in composer.json.",
"version": "1.0.0",
"type": "metapackage",
"license": "MIT",
austinpray / the-events-calendar-automatic-ticket-categories.php Automatically apply "tribe_events_cat" taxonomy terms to WooCommerce tickets when tickets are saved or updated.
View the-events-calendar-automatic-ticket-categories.php
// Apply product categories to newly created or saved tickets that match the The Events Calendar categories of the associated event
add_action('event_tickets_after_save_ticket', function ($event_id, $ticket, $raw_data, $classname) {
if (empty($ticket) || !isset($ticket->ID)) {
// Apply the "event-tickets" category to add tickets so that all tickets have at least this category to start
wp_add_object_terms($ticket->ID, 'event-tickets', 'product_cat');
#!/usr/bin/env bash
for i in 7.1 7.2 7.3;
docker run -v $(pwd):/app -w /app php:$i php test-cast.php
docker run -v $(pwd):/app -w /app php:$i php test-no-cast.php
austinpray / bad.jsx
Last active Sep 19, 2018
PostListing Refactor. I'm using .jsx filenames so I can get proper filenames in the gist use .js or typescript in your project
View bad.jsx
import React from 'react'
const PostListing = ({post}) => (
austinpray /
Last active Sep 8, 2018
react-icons reduced testcase: uglifyjs compatiblity

react-icons/react-icons uglifyjs compat



  1. run ./test.js before.js and you get the contents of before.txt. Notice how uglify2 is failing. Older versions of webpack and many build tools use this.