Skip to content

Instantly share code, notes, and snippets.

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

Dwight Spencer denzuko

💬
linkedin.com/in/denzuko
View GitHub Profile
@denzuko
denzuko / stunnel.conf
Created October 1, 2022 07:30 — forked from nealey/stunnel.conf
stunnel configuration to connect to SSL+IRC
[slashnet]
client = yes
accept = 58697
connect = us.slashnet.org:6697
@denzuko
denzuko / Dockerfile
Last active July 4, 2022 19:28
Docker image release for newsraft
FROM python:latest as build
COPY . /src
WORKDIR /src
ENV DEBIAN_FRONTEND=noninteractive
RUN apt install -y libncurses5-dev libncursesw5-dev libsqlite3-dev libcurl-dev libexpat-dev libyajl-dev libgumbo-dev scdoc meson ninja-build
meson setup builddir && \
meson compile -C builddir
FROM scratch
COPY --from=build /src/builddir/* /
@denzuko
denzuko / Makefile
Last active June 23, 2022 04:59
Code for reddit.com/r/commandline/comments/vhz42v/remove_a_string_from_file_names_recursively/
SRC := $(wildcard *.m4a.mp3)
TARGET := $(subst mpa.mp3,mp3,$(SRC))
%.mp3: %.m4a.mp3:
@mv "$@" "$<"
all: $(TARGET)
@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