Skip to content

Instantly share code, notes, and snippets.

View espeon's full-sized avatar
:octocat:
octo cat

natalie espeon

:octocat:
octo cat
View GitHub Profile
@espeon
espeon / set-docker-up.sh
Last active July 5, 2021 06:23
docker-setup
# /bin/bash
# **be warned:** this might not work as an actual bash script
# set up docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# create and add your user to the "docker" group
sudo groupadd docker
sudo usermod -aG docker $USER
version: '3.4'
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: PAPER
SEED: "-7381235180058670651"
CONSOLE: "false"
@espeon
espeon / nginx.conf
Last active September 29, 2021 07:39
a nginx.conf to be used with kaltura's nginx-vod module
worker_processes auto;
events {
use epoll;
}
http {
log_format main '$remote_addr $remote_user [$time_local] "$request" '
'$status "$http_referer" "$http_user_agent"';
[Adblock Plus 2.0]
! Title: Honey Smart Shopping - Most Trackers Removed
! Expires: 2 days (update frequency)
! Homepage: https://www.joinhoney.com/
!Honey
@@||joinhoney.com*$document
@@||joinhoney.com*$elemhide
!
! Cash Back Trackers
@@||joinhoney.com^*
 .-/+oossssoo+\-.
`:+ssssssssssssssssss+:`
-+ssssssssssssssssssyyssss+-
.ossssssssssssssssssdMMMNysssso.
/ssssssssssshdmmNNmmyNMMMMhssssss\
+ssssssssshmydMMMMMMMNddddyssssssss+
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss\
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
+sssshhhyNMMNyssssssssssssyNMMMysssssss+
ossyNMMMNyMMhsssssssssssssshmmmhssssssso
@espeon
espeon / revMonRes.ps1
Last active September 25, 2024 16:53
set and reverse monitor resolution, invoke via `powershell.exe -executionpolicy bypass -windowstyle hidden -file "C:\Your\ScriptHere.ps1"`
$content = Get-Content -Path "$env:APPDATA\sunshineres-resolution.txt";
$height = ($content | Select-String 'h:').ToString() -replace '\D+', '';
$width = ($content | Select-String 'w:').ToString() -replace '\D+', '';
$fps = ($content | Select-String 'f:').ToString() -replace '\D+', '';
# for debug
echo "qres /x:$width /y:$height /r:$fps" | Out-File -FilePath "$env:APPDATA\sunshineres-latest-rev-dbg.txt";
qres /x:$width /y:$height /r:$fps
@espeon
espeon / ffupdate.sh
Last active August 29, 2024 18:10
Little ffmpeg update script
#!/bin/bash
# Variables
BASE_URL="https://johnvansickle.com/ffmpeg/builds"
# 'git' or 'release'
FF_VERSION="git"
# See John's website for supported arches: https://johnvansickle.com/ffmpeg/
FF_ARCH='amd64'
DOWNLOAD_DIR="$HOME/ffmpeg"
FFMPEG_ARCHIVE="ffmpeg-$FF_VERSION-$FF_ARCH-static.tar.xz"
@espeon
espeon / scrollingText.tsx
Last active September 3, 2024 19:32
Component that scrolls text if text boundaries are larger than the width of the container
import clsx from "clsx";
import React, { CSSProperties, useEffect, useRef, useState } from "react";
interface ScrollingTextProps {
/// Any other class names you need to put inside this component
className?: string;
/// The text (or component) to put inside. It should be inline.
text?: React.ReactNode;
/// Width on either side to fade in px, if the text wraps around
fadeWidth?: number;
@espeon
espeon / ticker.tsx
Last active September 5, 2024 00:05
react ticker with twcss animations - based off https://github.com/TuckerMassad/react-animated-counter
import React, {
memo,
useEffect,
useCallback,
useRef,
useState,
CSSProperties,
} from "react";
export interface AnimatedCounterProps {
@espeon
espeon / mkcmaf.sh
Last active October 5, 2025 01:48
Generate a CMAF streamable HLS/DASH manifest from any audio file. Will need FFmpeg and Bento4 in your PATH. You can get binaries here: https://ffmpeg.org https://www.bento4.com/
#!/bin/bash
# Generate a CMAF streamable HLS/DASH manifest from any audio file.
# You will need FFmpeg and Bento4 in your PATH.
# Get binaries here: https://ffmpeg.org https://www.bento4.com/
# array of kbps to transcode to opus to mp4
# use below as a 'magic number' to use FLAC instead of Opus
magic_number=1000