Skip to content

Instantly share code, notes, and snippets.

@chrisfu
chrisfu / change_jellyfin_web_metadata.sh
Last active September 19, 2023 11:01
Jellyfin Modify Metadata for index.html to prevent site deceptive site warning in Google
#!/bin/bash
TMP_RELAPATH=index.html.tmp
DEST_RELAPATH=jellyfin/jellyfin-web/index.html
CONTAINER_NAME=jellyfin
USER=plex
GROUP=plex
# Copy source index.html from running Jellyfin instance
docker cp ${CONTAINER_NAME}:/jellyfin/jellyfin-web/index.html ./${TMP_RELAPATH}
@chrisfu
chrisfu / linux-explorer.sh
Last active February 23, 2024 10:44
Linux Explorer system information script
#!/bin/bash
##############################################################################
#
#
# FILE : linux-explorer.sh
# Last Change Date : 04-07-2016
# Author(s) : Joe Santoro
# Date Started : 15th April, 2004
# Email : linuxexplo [ at ] unix-consultants.com
# Web : http://www.unix-consultants.com/examples/scripts/linux/linux-explorer
@chrisfu
chrisfu / keybase.md
Created December 23, 2015 10:00
keybase.md

Keybase proof

I hereby claim:

  • I am chrisfu on github.
  • I am chrisfu (https://keybase.io/chrisfu) on keybase.
  • I have a public key ASDdKhkL4y3-S1sEf_pIIx_6kAKS51ejHMpR0xxOesqBBQo

To claim this, I am signing this object:

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
#!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import os
import random
import string
import tempfile
import binascii
import sys
import subprocess
@chrisfu
chrisfu / build_bash32.sh
Created September 26, 2014 16:40
Update bash on old unsupported Debian varients
# inspired by http://askubuntu.com/a/528171
# prerequisites
sudo apt-get install bison flex make patch gcc byacc
# get bash 3.2 source
mkdir src && cd src
wget http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz
tar zxvf bash-3.2.tar.gz
cd bash-3.2