Skip to content

Instantly share code, notes, and snippets.

View maietta's full-sized avatar

Nick Maietta maietta

View GitHub Profile
@husain-zaidi
husain-zaidi / loopbackaudio.go
Created May 15, 2022 10:28
Records desktop/system audio using malgo, loopback WASAPI backend. Saves raw audio. golang
package main
import (
"fmt"
"os"
"github.com/gen2brain/malgo"
)
func main() {
@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active May 18, 2024 18:32
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@darconeous
darconeous / rect-starlink-cable-hack.md
Last active March 22, 2024 14:45
Hacking the Rectangular Starlink Dishy Cable
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 18, 2024 11:17
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@heinrich-ulbricht
heinrich-ulbricht / install-docker-qubesos-deb10-templatevm.sh
Created February 23, 2020 21:13
Install Docker In Qubes OS Debian 10 TemplateVM (note the AppVM steps)
#!/bin/bash
#
# -----------------------
#
# This is a script that installs docker-ce (Docker Community Edition) on Debian 10
# Inspired by https://gist.github.com/upbeta01/3b968320b3a579c326ab6cd2a195b10d
#
# -----------------------
# Pre-requesite
@gpanders
gpanders / docker-backup.sh
Last active November 20, 2023 13:16
Backup and restore Docker volumes to/from a compressed tar file
#!/bin/bash
set -e
usage() {
echo "Usage: $(basename "$0") [-v] volume_name backup_dir"
}
v=""
while getopts "hv" o; do
@greenmoss
greenmoss / certbot-dns-mailcow
Last active December 10, 2023 06:23
This script renews letsecnrypt SSL certificates using Cloudflare dns-1 renewal. It assumes you are using Mailcow.
#!/usr/bin/env bash
# This script renews letsecnrypt SSL certificates using Cloudflare dns-1 renewal
# It assumes you are using Mailcow
set -euo pipefail
# REQUIRED set these:
your_email=letsencrypt@your.domain
your_domain=mail.your.domain # only tested with single domain
cloudflare_ini_path=/root/.cloudflare # add your Cloudflare file here, called cloudflare.ini
@kaiiak
kaiiak / mp3_to_pcm.go
Last active March 23, 2024 15:28
convert mp3 to pcm with golang
package ffmpeg
import (
"errors"
"fmt"
"io"
"unsafe"
"github.com/giorgisio/goav/avcodec"
"github.com/giorgisio/goav/avformat"
@guillemcanal
guillemcanal / puppeteer.js
Created April 2, 2019 22:05
control a chrome instance running on you Mac using a containerized puppeteer script
// First, run a Chrome instance on your Mac:
// /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 &> /dev/null &; disown
const puppeteer = require('puppeteer-core');
const axios = require('axios');
const getBrowserWSEndpoint = async (baseUrl) => {
const response = await axios.get(`http://${baseUrl}/json/version`);
return response.data.webSocketDebuggerUrl;
@drbh
drbh / checkIsBrave.js
Created January 30, 2019 20:19
Reliably detect Brave Browser with native JS
// helper to find Brave in User Agent string
function isBraveAgent(userAgentResponse) {
var isBraveIndex = ~userAgentResponse.indexOf('Brave')
if (isBraveIndex < 0) {
return true
}
return false
}
// Function from Javarome