Skip to content

Instantly share code, notes, and snippets.

View mrxinu's full-sized avatar

Steve Klassen mrxinu

View GitHub Profile
@nnja
nnja / taking_notes.py
Last active June 28, 2019 16:49
Python script to select a random person to take notes in a meeting ⌨️🎉
import random
participants = ["Lena", "Seth", "Paul", "Suz", "Nina", "Burke", "Todd"]
print(f"{random.choice(participants)} is taking notes.")
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
const Player = ({ tempo, phrases, assets, playing, length, togglePlaying, stopPlaying }) => {
const [audioLoading, setAudioLoading] = useState(true);
const [audioPhrases, setAudioPhrases] = useState({});
const [beat, setBeat] = useState(0);
const timeout = useRef();
const playingNodes = useRef([]);
useEffect(() => {
@mattifestation
mattifestation / GetSecureBootPolicy.ps1
Last active June 21, 2021 13:37
Partially-completed Secure Boot policy parser. I need help with parsing our the BCD element values.
function Get-SecureBootPolicy {
<#
.SYNOPSIS
Parses a Secure Boot policy.
.DESCRIPTION
Get-SecureBootPolicy parses either the default, system Secure Boot policy or a policy passed as a byte array. The byte array must be a raw, unsigned policy.
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@seanmhanson
seanmhanson / ableismSanityCheck.md
Created April 3, 2017 16:17
Ableist Language in Code: Sanity Check

Ableist Language in Code: Sanity Check

Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.

The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.

There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday c

@avafloww
avafloww / PhpJava.java
Last active October 16, 2022 18:50
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();

Replace yourdomain with your service now URL. User must have the rest_service role.

@pascalpoitras
pascalpoitras / config.md
Last active May 11, 2024 04:13
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@Sharpie
Sharpie / Vagrantfile
Last active September 22, 2022 01:16
A simple Vagrantfile for spinning up a master-agent pair.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This configuration requires Vagrant 1.5 or newer and two plugins:
#
# vagrant plugin install vagrant-hosts ~> 2.1.4
# vagrant plugin install vagrant-auto_network ~> 1.0.0
#
# After installation, the following steps will spin up a master and agent that
# can communicate with each other:
@jasontucker
jasontucker / updateip.php
Created October 26, 2012 19:32
Update single ip address from dyndns into the allowed IP address of InfiniteWP
<?php
// Install this file in the infiniteWP folder, name it something
// obscure then have cron run ever 3 mins to update the db to the latest IP.
// Add the following to cron, this will update the ip address every 3 minutes.
//
// */3 * * * * /usr/local/bin/php /home/username/infinitewp/updateip.php
// What is your dyndns hostname?