Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
twitter.com/denzuko

Dwight Spencer (denzuko@mastodon.social) denzuko

💬
twitter.com/denzuko
View GitHub Profile
@denzuko
denzuko / Makefile
Last active June 10, 2022 02:07
Yet Another Ansible clone of ssh+make in GNU Make
## Execute:
## NUM_THREADS=4 make --jobs=${NUM_THREADS} RHOSTS="host1.local host2.local host3.local" CMD="whoami" RUSER="${USER}"
## RUNTIME flags
NUM_THREADS := 1
RHOSTS := example.com
CMD := uptime
RUSER := root
SSH_FLAGS := -l $(RUSER)
###
@denzuko
denzuko / fabrio.nomad
Last active March 4, 2022 21:53
Cluster Jobs - nomad, waypoint, terraform, consul-template, etc..
job "Fabio-Install" {
datacenters = ["dc1"]
type = "sysbatch"
group "Service" {
task "Start service" {
driver = "raw_exec"
artifact {
source = "https://github.com/fabiolb/fabio/releases/download/v1.5.15/fabio-1.5.15-go1.15.5-linux_amd64"
import Eris from "eris";
const dataFactory = (error, value) => ({
error: Boolean(error),
data: value
});
export default class Radio extends Eris {
constructor(props) {
super(props.token || "");
@denzuko
denzuko / user-data.yaml
Created January 17, 2022 06:16
Example user-data
#cloud-config
# vim: set ts=2 sw=2 filetype=yaml:
#/boot/user-data
---
hostname: pi.local
manage_etc_hosts: true
users:
- name: pirate
gecos: "Hypriot Pirate"
@denzuko
denzuko / README
Last active December 14, 2021 09:31 — forked from artiee/README
Test setup for requirejs, backbone, underscore, handlebars...
Create the structure above and download the required libraries
*** You must run this on server (e.g. on a local Apache or Node.js) because RequireJS's text-plugin won't be able to fetch the required handlebar-templates due to browser-security. ***
$ sudo apt-get update
... # trunicated # ...
Ign https://packagecloud.io jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_US
int main(int i){for(;i-5000;i++,puts("I will not use classes"));}
@denzuko
denzuko / helo.bas
Last active March 11, 2021 08:28
Arduino64
5 FALSE = .:TRUE = NOT FALSE
10 HI=255: LO=0:DEV=56579:COMM=56577
15 DIM D(7)
20 D(0)=1:D(1)=2:D(2)=4:D(3)=8
22 D(4)=16:D(5)=32:D(6)=64:D(7)=128
25 POKE DEV,HI:POKE COMM,LO
100 FOR X=0 TO 7: GOSUB 300:NEXT
200 FOR X=7 TO 1 STEP -1: GOSUB 300:NEXT
250 GOTO 100
@denzuko
denzuko / bbslink.py
Last active March 5, 2024 14:11
bbslink.mpy door menu - InterBBS Server
@denzuko
denzuko / POWERBALL.BAS
Created August 22, 2020 03:06
Random Program found while restoring a C128. Author is unattributed. Seems to print five random numbers after each press of return...
100 REM**RANDOM NUMBERS**
200 REM**CLEAR THE SCREEN**
210 PRINT CHR$(147)
220 REM**GET A NUMBER**
240 PRINT "PRESS RETURN"
260 INPUT NUM
300 REM**PRINT RANDOM NUMBERS**
310 FOR N=1TO5
315 V=INT(RND(0)*41)+5
320 PRINT INT(V)