Skip to content

Instantly share code, notes, and snippets.

View jenkoian's full-sized avatar
👨‍💻
Works on my machine

Ian Jenkins jenkoian

👨‍💻
Works on my machine
View GitHub Profile
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw
@ShawnMcCool
ShawnMcCool / 0---Overview.md
Last active October 7, 2022 07:37
Testing at Boundaries with Test Doubles and Fixtures: A Vertical Slice

Overview

In this gist, I attempt to communicate techniques for defining explicit boundaries over naturally occuring boundaries (in this case, the boundary between domain and service/data layers) to empower both testing and to improve comprehensibility of the system.

In my view, testing and application code are one-and-the-same and should evolve together. Testing code should not be an after-thought. I believe that haphazardly designing application code and test code leads to lead-time penalities.

If you'd like to reply, consider replying to this twitter thread. Additionally, I am available on Twitter @ShawnMcCool.

Note: I acknowledge that no techniques are right for everyone. But I have a long history with these techniques and I found them quite adequate for large and small-scale systems.

My kid 11yo has a blood phobia. I asked Twitter for suggestions for action/adventure/scifi/fantasy/comedy movies that are suitable for a 9 and 11 yo who like Star Wars and Back to the Future.

Below are the movies people have suggested. They often did so from memory, and I haven't validated if they are indeed suitable. However, I learned about this site where you can lookup if a moview has blood or other phobia-inducing content: https://www.doesthedogdie.com/

Has no blood

@ciaranmcnulty
ciaranmcnulty / notes.md
Last active March 25, 2024 06:36
Notes on using Docker on ARM Macs (November 2021)

Docker for Mac

On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker) might require Rosetta.

Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)

Pulling and running with Docker

Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli image has the following digests:

@carlalexander
carlalexander / expect-header-fix.php
Last active August 13, 2021 00:40
WordPress "Expect" header fix
<?php
/**
* By default, cURL sends the "Expect" header all the time which severely impacts
* performance. Instead, we'll send it if the body is larger than 1 mb like
* Guzzle does.
*/
function add_expect_header(array $arguments)
{
$arguments['headers']['expect'] = '';
document.querySelectorAll('.Box-row .js-navigation-open').forEach( (item) => {
const filename = item.textContent.toLowerCase();
const humanFiles = ['AUTHORS', 'CHANGELOG', 'CODE_OF_CONDUCT', 'CONTRIBUTING', 'LICENSE', 'README', 'TECHNOLOGY', 'TROUBLESHOOTING', 'SECURITY'];
const row = item.parentNode.parentNode.parentNode;
if((filename != 'src' && filename.endsWith('rc'))
|| filename.includes('config')
|| filename.includes('ignore')
|| filename.includes('.conf.js')
|| filename.includes('webpack')
|| filename == 'robots.txt'
@Ocramius
Ocramius / psalm-compendium.php
Last active November 9, 2023 07:27
A small compendium of what is possible with `vimeo/psalm` 3.9.x to add some decent type system features to PHP
<?php
// -- types are a compile-time propagated concept
// https://psalm.dev/r/338f74a96c
class TheType
{
/** @var string */
public $foo = 'bar';
}
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@dinarcon
dinarcon / behat-test.feature
Created September 7, 2019 21:03
WordPress BDD testing with Behat and WordHat
Feature: Visibility of the homepage
In order to have confidence that my site is accessible
As a site administrator
I want to verify I can visit the homepage
Scenario: Verify the homepage
Given I am on the homepage
Then the response status code should be 200
@nathansmith
nathansmith / react_101.md
Last active June 18, 2021 19:28
React 101™

React 101™

All these examples do essentially the same thing.

return (
  <MyComponent
    something={something}
    somethingElse={somethingElse}
 &gt;