Skip to content

Instantly share code, notes, and snippets.

View AaronNGray's full-sized avatar

Aaron Gray AaronNGray

View GitHub Profile
@AaronNGray
AaronNGray / index.d.ts
Created September 4, 2024 20:45
@types/ws/index.d.ts
/// <reference types="node" />
import { EventEmitter } from "events";
import {
Agent,
ClientRequest,
ClientRequestArgs,
IncomingMessage,
OutgoingHttpHeaders,
Server as HTTPServer,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meeting Schedule</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.38/moment-timezone-with-data.min.js"></script>
<style>
/* Add some basic styling */
@AaronNGray
AaronNGray / schedule.html
Created July 31, 2024 18:58
theconversation.cc/schedule.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meeting Schedule</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.38/moment-timezone-with-data.min.js"></script>
<style>
/* Add some basic styling */
pip install "typer<0.5.0,>=0.4.1" "tomli<3.0.0,>=2.0.1" "rich<13.0.0,>=12.4.4" "httpx<0.24.0,>=0.23.0" "anyio<4.0.0,>=3.6.1" "nala"
pip install --upgrade duplicity
#!/usr/bin/env bash
if [ ! `which jq` ]
then
echo Installing 'jq'
sudo apt-get install jq -y
fi
set -euo pipefail
#!/usr/bin/env bash
# webfinger
if [ ! `which jq` ]
then
echo Installing 'jq'
sudo apt-get install jq -y
fi
set -euo pipefail
@AaronNGray
AaronNGray / instanceof.ts
Created September 21, 2023 04:33
instanceof.ts
abstract class A {
abstract run(): Promise<void>
}
export class B implements A {
async run(): Promise<void> {
}
}
const I = new B();
@AaronNGray
AaronNGray / qt-everywhere-opensource-src-5.15.9
Created August 29, 2023 19:38
qt-everywhere-opensource-src-5.15.9
tar xf ~/Downloads/qt-everywhere-opensource-src-5.15.9.tar.xz
cd qt-everywhere-src-5.15.9
mkdir build
cd build
../configure
make
sudo make install
@AaronNGray
AaronNGray / bitset lookahead-ANDNZ.cpp
Created January 6, 2023 20:15
lookahead bitset guard - ANDNZ
#include <cstddef>
#include <initializer_list>
template<size_t BITS>
class bitset
{
public:
bitset() : sizeInBits(BITS), sizeOfWord(sizeof(WORD) * 8), sizeInWords((BITS + (sizeof(WORD) * 8) - 1) / (sizeof(WORD) * 8)) {
for (size_t i = 0; i < sizeInWords; ++i)
data[i] = 0;
@AaronNGray
AaronNGray / gist:dd227dcab6ec917152be0e6677a02939
Created January 6, 2023 20:13
lookahead bitset-ANDNZ.cpp
#include <cstddef>
#include <initializer_list>
template<size_t BITS>
class bitset
{
public:
bitset() : sizeInBits(BITS), sizeOfWord(sizeof(WORD) * 8), sizeInWords((BITS + (sizeof(WORD) * 8) - 1) / (sizeof(WORD) * 8)) {
for (size_t i = 0; i < sizeInWords; ++i)
data[i] = 0;