Skip to content

Instantly share code, notes, and snippets.

View suhlig's full-sized avatar
😻
Happy

Steffen Uhlig suhlig

😻
Happy
View GitHub Profile
@Gestas
Gestas / youtube-archive-channels.sh
Created January 6, 2023 22:26
Youtube channel archiver -
#!/bin/sh
#
# Based on the TheFrenchGhosty's Ultimate YouTube-DL Scripts Collection: The ultimate collection of scripts for YouTube-DL
# https://github.com/TheFrenchGhosty/TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection
# Version: 3.2.2
#
STORAGE_PATH="~/youtube/"
SUBSCRIPTIONS_FILE="youtube-subscriptions.lst"
DOWNLOAD_ARCHIVE="downloaded-videos.lst"
LOG_FILE="yt-dlp.log"
# you must also upload the public key as signing key to https://github.com/settings/keys
git config --global user.signingkey '~/.ssh/id_rsa'
git config --global commit.gpgsign true
git config --global gpg.format ssh
# (optional) this file enables `git log --show-signature` and contains email addresses associated with public keys
git config --global gpg.ssh.allowedsignersfile '~/.ssh/git-signers'
@gurjeet
gurjeet / _my_golang_script.go
Last active March 14, 2022 01:28
GoLang Scripting
//usr/bin/env true; go run `dirname $0`/*.go "$@"; exit $?
package main
import (
"errors"
"os"
)
// TODO: catch Panics and emit a clear message
func main() { os.Exit(mainWithExitCode()) }
require 'apple_id'
# NOTE: in debugging mode, you can see all HTTPS request & response in the log.
# AppleID.debug!
pem = <<-PEM
-----BEGIN PRIVATE KEY-----
:
:
-----END PRIVATE KEY-----
@rikonor
rikonor / main.go
Created January 19, 2019 02:43
Server Sent Events (SSE) Example in Go
package main
import (
"fmt"
"log"
"net/http"
"sync"
"time"
)
@suhlig
suhlig / install-tmux
Last active October 12, 2023 21:25 — forked from philipsd6/install-tmux
Install tmux on rhel/centos
# Install tmux on rhel/centos 7
# What do we want?
libeventversion=2.1.11
tmuxversion=3.1
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@maruel
maruel / Instructions
Created January 2, 2017 03:38
systemd files to enable SPI on startup on a C.H.I.P.
- Create the two files enable_spi.service and enable_spi.timer in /etc/systemd/system/
- Run the following:
sudo systemctl daemon-reload
sudo systemctl enable enable_spi.timer
sudo systemctl start enable_spi
/dev/spidev32766.0 should now be visible.
@colthreepv
colthreepv / Dockerfile
Last active February 6, 2020 06:55
Concourse CI inside Docker compose v2
FROM alpine:latest
RUN apk update && apk upgrade && \
apk add --no-cache \
openssh
RUN mkdir -p /keys/web /keys/worker
CMD ssh-keygen -t rsa -f /keys/web/tsa_host_key -N '' && \
ssh-keygen -t rsa -f /keys/web/session_signing_key -N '' && \
@schmohlio
schmohlio / sse.go
Last active February 13, 2023 08:38 — forked from ismasan/sse.go
Example SSE server in Golang
// v2 of the great example of SSE in go by @ismasan.
// includes fixes:
// * infinite loop ending in panic
// * closing a client twice
// * potentially blocked listen() from closing a connection during multiplex step.
package main
import (
"fmt"
"log"