Skip to content

Instantly share code, notes, and snippets.

View Codingale's full-sized avatar

Codingale Codingale

  • 06:12 (UTC -04:00)
View GitHub Profile
@mjblay
mjblay / waitForKeyElements.js
Last active October 18, 2023 18:34 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content. Forked for use without JQuery.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (element) {
element.text ("This comment changed by waitForKeyElements().");
@Joe4evr
Joe4evr / AudioModule.cs
Last active October 18, 2023 15:32
D.Net 1.0 audio example
using System.Threading.Tasks;
using Discord.Commands;
public class AudioModule : ModuleBase<ICommandContext>
{
// Scroll down further for the AudioService.
// Like, way down
private readonly AudioService _service;
// Remember to add an instance of the AudioService
@mattkrins
mattkrins / cl_surfaceGetURL.lua
Last active December 1, 2022 18:04
This is a simple Garry's Mod helper function to hot-load images from a web URL for use in your rendering operations.
local WebMaterials = {}
function surface.GetURL(url, w, h, time)
if !url or !w or !h then return Material("error") end
if WebMaterials[url] then return WebMaterials[url] end
local WebPanel = vgui.Create( "HTML" )
WebPanel:SetAlpha( 0 )
WebPanel:SetSize( tonumber(w), tonumber(h) )
WebPanel:OpenURL( url )
WebPanel.Paint = function(self)
if !WebMaterials[url] and self:GetHTMLMaterial() then
@a-c-t-i-n-i-u-m
a-c-t-i-n-i-u-m / freenom.com.ddns.sh
Created July 7, 2015 12:07
Dynamic DNS support shell script for freenom.com
#!/bin/bash
# settings
# Login information of freenom.com
freenom_email="main@address"
freenom_passwd="pswd"
# Open DNS management page in your browser.
# URL vs settings:
# https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id}
freenom_domain_name="domain.name"
@xanathar
xanathar / MoonSharpInfiniteLoopCheck
Created April 13, 2015 08:36
[MoonSharp] - How to limit execution of a script to n instructions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Debugging;
namespace Tutorials.Chapters
{