Skip to content

Instantly share code, notes, and snippets.

View lynsei's full-sized avatar
:octocat:
Will code for food

Lynsei lynsei

:octocat:
Will code for food
View GitHub Profile
@lynsei
lynsei / plugin-name.umd-module.js
Created November 15, 2021 02:40
This is a UMS Plugin beingn created for jQuery, following the UMD spec here: https://github.com/umdjs/umd
// Uses CommonJS, AMD or browser globals to create a jQuery plugin.
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = function( root, jQuery ) {
if ( jQuery === undefined ) {
@lynsei
lynsei / deploy-your-own-saas.md
Last active January 19, 2024 20:22
[how to unpack an xpi | asar, reference] #asar #xpi #unpack #xpi-unpack #firefox-extension #userChrome.css #hack #userChrome.css does stuff
@lynsei
lynsei / Generic.ts
Created October 22, 2023 19:02
Property event change
type PropEventSource<Type> = {
on<Key extends string & keyof Type>
(eventName: `${Key}Changed`, callback: (newValue: Type[Key]) => void): void;
};
declare function makeWatchedObject<Type>(obj: Type): Type & PropEventSource<Type>;
const person = makeWatchedObject({
firstName: "lynsei",
lastName: "asynyn",
@lynsei
lynsei / auto-proxy.sh
Last active September 28, 2023 18:12
[auto proxy] a jwilder reverse proxy for quickly spinning up SSL & Nginx
#!/usr/bin/bash
OS=`uname -s`
REV=`uname -r`
MACH=`uname -m`
if [ "${OS}" = "SunOS" ] ; then
OS=Solaris
ARCH=`uname -p`
OSSTR="${OS} ${REV}(${ARCH} `uname -v`)"
@lynsei
lynsei / error_handling_example.sh
Created September 26, 2023 16:52 — forked from pasela/error_handling_example.sh
[bash]error handling and error report example
#!/bin/bash
#
# error handling and error report example
#
set -e
# logfile
LOGFILE=`mktemp`
@lynsei
lynsei / edge
Last active November 11, 2022 02:26
[lynslang] #current #version #verify #verification gist. This gist is use to confirm the latest versions for each channel.
0.9.95.dbld.00103
@lynsei
lynsei / events.md
Created November 8, 2022 18:47
[L7L2]. #Event #Bridge #Events #API #Service #Endpoint #List
@lynsei
lynsei / randomness.c
Last active October 18, 2022 01:11
[/dev/urandom] seed generation for entropic data uses this code...
// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
* Copyright (C) 2017-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
* Copyright Matt Mackall <mpm@selenic.com>, 2003, 2004, 2005
* Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights reserved.
*
* This driver produces cryptographically secure pseudorandom data. It is divided
* into roughly six sections, each with a section header:
*
* - Initialization and readiness waiting.
@lynsei
lynsei / index.html
Last active October 2, 2022 17:22
Splash page generator
<div id="row">
<h1 id="heading" contenteditable="true">GLOBAL.PKGDIST.COM</h1>
<h4 id="strapline" contenteditable="true">GLOBAL SOFTWARE DISTRIBUTION CDN </h4>
<span><a class="button" href="https://github.com/lynslang/" target="_blank">LynsLang CE | EE</a></span>
</div>
@lynsei
lynsei / release-automation.lets-encrypt.jwilder.volume.lyns.md
Last active September 18, 2022 06:21
[Let's Encrypt + Nginx Proxy Companion + Release Detection + Key Mount and Cert Mount Sharing] #release #automation for #certs using #letsencrypt #certificate #key #automation
#
# This simply allows the script to find the private key, chain certifiate, and root cert for any sub-domain that was triggered in automation using Lets Encrypt and a Jwilder proxy # # # companion container and their awesome API!
#
#  1. With LynsLang/Fish or Bash you can first `docker ps` with a filter for "name=nginx-proxy-lets" which will provide the container id easily,
#     provided you supply the correct go-lang template parameters: