Skip to content

Instantly share code, notes, and snippets.

View noahm's full-sized avatar

Noah Manneschmidt noahm

View GitHub Profile
@noahm
noahm / changelog.md
Last active April 11, 2024 23:37
SMX song changes

SMX Song Changes

Covers re-rates and new charts added according to data available in the mobile apps.

April 11 2024

New Default Songs

These songs were formerly in a free DLC pack that required the cab owner to link the pack to a machine on the website. They are now included on all cabs by default.

  • Bad 4 My Health
@noahm
noahm / esm-package.md
Created November 21, 2022 22:37 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
type ArraysOfEachProperty<T> = {
[Property in keyof T]: Array<T[Property]>;
}
function fieldArrsToObjs<T extends {}>(arrs: ArraysOfEachProperty<T>): Array<T> {
const ret: T[] = [];
Object.entries(arrs).forEach(([key, values]) => {
(values as unknown[]).forEach((value, idx) => {
if (!ret[idx]) {
// @ts-expect-error
@noahm
noahm / README.md
Created December 3, 2021 18:23
SMX/PC quick-swap setup

img1

Here's a wide shot, cable managment with simple velcro ties.

img2

Inside the lid. Had to really cram all this in there carefully. Swapping between SMX and the PC is just a matter of pushing each of the three buttons on the switcher boxes.

@noahm
noahm / failing-tests.sh
Created August 10, 2018 17:34
Get failing test files
yarn test --json --outputFile=testResult.json
jq -r ".testResults | map(select(.status == \"failed\"))[].name" testResult.json | sort | colrm 1 `pwd | wc -c`
@noahm
noahm / libc++.diff
Last active December 27, 2015 17:48
Mirrored attachment from https://code.google.com/p/google-glog/issues/detail?id=121#c3 for use with homebrew (edited for use as -p1)
Index: /src/stl_logging_unittest.cc
===================================================================
--- /src/stl_logging_unittest.cc (revision 136)
+++ /src/stl_logging_unittest.cc (working copy)
@@ -31,17 +31,20 @@
#ifdef HAVE_USING_OPERATOR
-#ifdef __GNUC__
+#include <iostream>
@noahm
noahm / GetCases.java
Created October 19, 2013 20:06
A java-based tribunal scraper. Originally written by Lecherito (originally found here: http://pastebin.com/7Sp1eJwv)
package Tribunal;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
@noahm
noahm / Program.cs
Last active December 25, 2015 21:59
for BOOEAN!
using System;
using System.Text.RegularExpressions;
class Program
{
static void Main()
{
// Input string.
const string example = "Name:\r\n\r\nEmail: jasonbateman@yahoo.com\r\n\r\nPhone: 333-343-0909\r\n\r\n";
@noahm
noahm / disableEditorShortcuts.js
Created October 3, 2013 16:15
Userscript to disable keyboard shortcuts for GWJ's quick reply editor
// ==UserScript==
// @name Disable GWJ editor keyboard shortcuts
// @description Avoids frustration while composing a post
// @author Noah Manneschmidt
// @namespace gamerswithjobs
// @include http://www.gamerswithjobs.com/*
// @version 1
// @grant none
// ==/UserScript==
@noahm
noahm / html_notification_patch.js
Created August 14, 2013 19:32
Compatibility shim for chrome's desktop notification API, and lines to turn on notifications in Steam's web chat after they have been disabled following a page load
/*
* Patch in support for Google's draft webkit version of HTML notifications
* It seems that firefox doesn't currently support the iconUrl option.
* see the official spec at: http://www.w3.org/TR/2012/WD-notifications-20120614/#api
* and google's spec at: http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification
*/
window.webkitNotifications = {
requestPermission: function(callback){
Notification.requestPermission(callback);