Skip to content

Instantly share code, notes, and snippets.

@justSteve
justSteve / gist:9754fcefda5e67b2748915c643e63411
Last active February 12, 2023 14:46
attempts to read all msgs in channel since given date
// lots of iterations trying this and i think this gets close
// but i'm hung up on the correct way to deal with lastMessage.createdAt
// this code tosses: TypeError: Cannot read properties of undefined (reading 'createdAt')
const Discord = require('discord.js');
const axios = require('axios');
const { Intents } = require('discord.js');
const { exec } = require('child_process');
@justSteve
justSteve / machine.js
Created March 4, 2021 15:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@justSteve
justSteve / MyComputerSetup
Last active August 29, 2015 14:07 — forked from zerioxen/MyComputerSetup
Defines the TTS DevOp build.
Set-ExplorerOptions -showHidenFilesFoldersDrives -showFileExtensions
Install-WindowsUpdate -acceptEula
Enable-RemoteDesktop
<
#cinst IIS-WebServerRole -source windowsfeatures
#>
Install-WindowsUpdate -acceptEula
@justSteve
justSteve / gist:10413809
Last active August 29, 2015 13:58
gistThat_
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load
' bootstrap code to update VBA modules from gists
' all code is in [brucemcpherson] module - so no classes etc.
' latebinding is used to avoid need for any references
' can be found at https://gist.github.com/3403537
Option Explicit
' v2.04 - 3403537
' if you are using your own gists - change this
Const gistOwner = "justSteve"
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),