Skip to content

Instantly share code, notes, and snippets.

@fonic
fonic / ubcd2usb.sh
Last active September 1, 2022 08:04
Create bootable device from Ultimate Boot CD ISO image
#!/usr/bin/env bash
# -------------------------------------------------------------------------
# -
# Create bootable device from Ultimate Boot CD ISO image -
# -
# Created by Fonic <https://github.com/fonic> -
# Date: 09/23/20 - 09/23/20 -
# -
# Based on: -
@lambdan
lambdan / irssi twitch.txt
Last active April 29, 2024 22:28
Twitch chat with irssi - October 2023
Tested working 15 Jun 2020, irssi version 1.2.2
(Update: still works October 2023!)
This is a TLDR version of https://blog.crunchprank.net/connecting-to-twitch-chat-via-irssi/
Get your OAuth token (password) here: https://twitchapps.com/tmi/
# Network setup:
/network add -nick YOUR_TWITCH_USERNAME Twitch
@skinny
skinny / 00_readme.md
Last active February 1, 2024 12:50
ArgoCD & Kapitan configuration

Using ArgoCD together with Kapitan is actually pretty easy and only requires the kapitan binary in the argo-repo-server and a ConfigManagement plugin in ArgocD (https://argoproj.github.io/argo-cd/user-guide/config-management-plugins/)

1. Edit argocd-cm configmap and add :

  configManagementPlugins: |
    - name: kapitan
      init:
        command: [sh]
        args: ["kapitan-base-compile.sh"]
@bramford
bramford / mikrotik-rb750gr3-dnsmasq-dhcp-bootp-tftp-install.sh
Last active July 8, 2023 00:01
Install OpenWRT on Mikrotik hEX (RB750Gr3) using dnsmasq to provide DHCP/BOOTP/TFTP server
# These instructions assume the user is following the TL;DR guide for Mikrotik install:
# https://openwrt.org/toh/mikrotik/common
# 'Step-By-Step OpenWrt Installation Process on Routerboard'
# 'TL;DR: simple way for all supported models'
# Complete steps 1-4 of the guide
# On Debian host (in my case, a Lenovo Thinkpad running Debian Buster)
## Ensure WiFi is connected (as assumed) to an existing network with a WAN connection
## Take down the Wired connection
@alexsoin
alexsoin / setting-pandoc.txt
Created July 8, 2019 12:43
Настройки pandoc для вывода русского текста в pdf
sudo apt install texlive-xetex
sudo apt-get install texlive-lang-all
pandoc test.md -s -o test.pdf --latex-engine=xelatex
---
title: Title text
geometry: margin=2cm
lang: ru
header-includes: |
@cowlicks
cowlicks / Dockerfile
Last active September 11, 2023 19:23
Safely share your SSH access while building a Dockerfile using socat to forward ssh-agent's SSH_AUTH_SOCK
FROM python:3-stretch
COPY . /app
WORKDIR /app
RUN mkdir -p /tmp
# install socat and ssh to talk to the host ssh-agent
RUN apt-get update && apt-get install git socat openssh-client \
# create variable called SSH_AUTH_SOCK, ssh will use this automatically
@gomesar
gomesar / gist:f9c32463a8abbe02470b9934eeb09db5
Last active September 28, 2018 13:26
tmuxToTmuxinatorLayout.sh
#!/bin/bash
# Scritp to list tmux windows and respectives layouts inputs to tmuxinator
# shows windows number, name and TmuxinatorLayout
tmux list-windows | sed -r 's/([0-9]+: .*) \([0-9]+ panes\).*layout (.*)] @.*/\1:\n layout: \2/g'
# tmux: https://github.com/tmux/tmux/wiki
# tmuxinator: https://github.com/tmuxinator/tmuxinator
# quick profile config guide: https://fabianfranke.de/2013/11/19/use-tmuxinator-to-recreate-tmux-panes-and-windows/
@samael500
samael500 / handler.lua
Last active August 25, 2023 15:11
Validating payloads from GitHub webhooks with Nginx + Lua
-- luarocks install JSON4Lua
-- luarocks install luacrypto
local json = require "json"
local crypto = require "crypto"
local secret = '<MY SUPER SECRET>'
local event = 'push'
local branch = 'refs/heads/master'
@csonto
csonto / lvm-json
Created September 29, 2015 16:22
lvm-json
#!/usr/bin/python
import sys
import json
from lvmjson import *
import argparse
if __name__ == "__main__":
AVAILABLE_COMMANDS = ["lvs", "vgs", "pvs", "dminfo"]
@crohr
crohr / howto-stream-tmux-session-in-realtime-over-http.md
Last active January 22, 2024 08:25
Stream a tmux session in realtime over HTTP

On the server with tmux

Create a new tmux session:

tmux new-session -s my-session # launch `top`, `htop`, or anything that will regularly updates, then detach

Stream your session: