Skip to content

Instantly share code, notes, and snippets.

View fritzy's full-sized avatar
💽
Please Insert Disk III

Nathan Fritz fritzy

💽
Please Insert Disk III
  • Kennewick, WA
  • 15:54 (UTC -07:00)
  • X @fritzy
View GitHub Profile
@fritzy
fritzy / issues.sh
Last active March 2, 2023 21:06
Get random issues of a given labels from a repo
#!/bin/bash
# Usage: issues [label/p0-2] [limit] [pool_size]
# requires gh (github cli)
POOL_SIZE=${3:-50}
LIMIT=${2:-5}
LABEL=${1:-"Needs Triage"}
REPO="https://github.com/npm/cli"
if [[ $LABEL = "triage" ]];
then
@fritzy
fritzy / pixi_sprite_apeecs.js
Created August 7, 2020 21:47
ApeECS Example of Managing Sprites from Pixi.js
const ApeECS = require('ApeECS');
const Pixi = require('pixi.js');
const world = new ApeECS.World();
class Sprite extends ApeECS.Component {
static properties = {
x: 0,
y: 0,
layer: '',
texturePath: '',
let tick = 0;
class BasicObject {
constructor() {
this.x = 0;
this.y = 0;
this.updated = 0;
}
}
// This file was initially generated by Windows Terminal Dev 0.0.1.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@fritzy
fritzy / component.js
Last active April 18, 2019 03:42
Abusing Object.defineProperty and Object.getPrototypeOf to make a nice interface for ECS Components.
class BaseComponent {
constructor(ecs, initialValues) {
Object.defineProperty(this, 'ecs', { enumerable: false, value: ecs });
Object.defineProperty(this, 'type', { enumerable: false, value: this.constructor.name });
Object.defineProperty(this, '_values', { enumerable: false, value: {} });
Object.defineProperty(this, 'id', { enumerable: true, value: componentId });
this.lastTick = this.ecs.ticks;
componentId++;
using System;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Security.Cryptography.X509Certificates;
using System.Collections.Generic;
namespace LoginImpersonate
{
internal class Impersonation : IDisposable
{
@fritzy
fritzy / nodewebcrypto.js
Created April 13, 2018 21:20
Test of node-webcrypto-ossl
const RSA = { name: 'RSASSA-PKCS1-v1_5' };
const testValue = 'I am the very model of a modern major general.';
const testValue2 = 'I am the very model of a modern majr general.';
//if browser, uses window.crypto, if node wraps openssl
const WebCrypto = require('node-webcrypto-ossl');
const crypto = new WebCrypto();
(async () => {
console.log('generating key');
@fritzy
fritzy / keybase.md
Created January 23, 2018 01:32
keybase.md

Keybase proof

I hereby claim:

  • I am fritzy on github.
  • I am fritzy (https://keybase.io/fritzy) on keybase.
  • I have a public key ASCnN0TAG8SqzlRfVWz9_usucplgGZjT_Nxuf0lzAMzcWAo

To claim this, I am signing this object:

@fritzy
fritzy / changes_and_workarounds.md
Last active December 15, 2016 22:20
2016 Dell XPS 13 9360 Developer Edition

Upgrade to Linux 4.8

apt-cache search linux | grep 4.8

apt-get install linux-image-4.8xxxxx linux-extras-4.8xxxx linux-headers-4.8.x-xxxx

I used 4.8.0-30-generic flavors of all of those.

linux-image-4.8.0-30-generic - Linux kernel image for version 4.8.0 on 64 bit x86 SMP

[claptrap] ~/projects/node/seaquell 10:18 AM 89% [master ●]
$ npm test
> seaquell@0.17.1 test /Users/fritzy/projects/node/seaquell
> lab -a code -c -v
testing functions
✔ 1) create temp table proc (737 ms)
✔ 2) create user defined table proc (477 ms)
✔ 3) create get table proc (215 ms)