Skip to content

Instantly share code, notes, and snippets.

@phongphuhanam
phongphuhanam / jellyfin-samsung.md
Created February 8, 2025 14:18 — forked from SayantanRC/jellyfin-samsung.md
Sign Jellyfin for Samsung TVs

Prerequisite

This guide is based on using an Ubuntu VM. The whole process will take several hours when doing for the first time. I faced issues with Windows 11, but you are free to try it. There are helpful comments below for Windows users.

Please read all the steps first before proceeding.

Steps

  1. Get ubuntu 18.04 LTS. Create a VM if needed.
  2. Install Tizen Studio from here: https://developer.tizen.org/development/tizen-studio/download
  3. Run the .bin file from terminal
@phongphuhanam
phongphuhanam / Headscale setup.md
Created April 21, 2024 06:17 — forked from Und3rf10w/Headscale setup.md
How to set up headscale with SWAG in docker-compose

Overview

This document descrives the process of setting up headscale with swag, using letsencrypt certs.

This assumes you have a subdomain (e.g. wg.example.com) pointing to your SWAG instance and want to use it as a reverse proxy.

Swag .env

Add the subdomain for your desired headscale domain to your .env file.

For example: SWAG_EXTRA_DOMAINS=wg.example.com

@phongphuhanam
phongphuhanam / fswatch-scp.sh
Created August 17, 2023 11:13 — forked from glaszig/fswatch-scp.sh
use fswatch to scp changed files to remote host
#!/usr/bin/env sh
# Copyright 2020 glaszig
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#!/bin/bash
SOURCE_ADDR=$1
if [ $2 ]
then
TARGET_ADDR=$2
else
TARGET_ADDR=0.0.0.0:80
fi
@phongphuhanam
phongphuhanam / useful_word_vba_scripts.md
Created February 13, 2023 01:32
Useful VBA scripts for Word

Usefull VBA scripts for Word

VBA

  • Apply style to all table
Sub AutoTableFormat()

    Dim tbl As Table
    For Each tbl In ActiveDocument.Tables
 tbl.Range.Style = ActiveDocument.Styles("Table Text")
@phongphuhanam
phongphuhanam / transmission_remove_finished.sh
Created December 30, 2022 07:32 — forked from pawelszydlo/transmission_remove_finished.sh
Script to clear finished torrents from transmission-daemon
#!/bin/bash
# Clears finished downloads from Transmission.
# Version: 1.1
#
# Newest version can always be found at:
# https://gist.github.com/pawelszydlo/e2e1fc424f2c9d306f3a
#
# Server string is resolved in this order:
# 1. TRANSMISSION_SERVER environment variable
@phongphuhanam
phongphuhanam / macos-ramdisk.md
Created December 4, 2022 06:54 — forked from htr3n/macos-ramdisk.md
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@phongphuhanam
phongphuhanam / README.md
Created August 27, 2022 09:42 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@phongphuhanam
phongphuhanam / inotify-channel-backup.md
Created August 27, 2022 09:42 — forked from alexbosworth/inotify-channel-backup.md
Backup channel.backup file using systemd and inotify

LND backup script for channel.backup using inotify

Install inotify

sudo apt install inotify-tools

Create script to watch for changes and copy on change

@phongphuhanam
phongphuhanam / cvim.sheetcheat.md
Created February 9, 2022 07:32 — forked from rachidbch/cvim.sheetcheat.md
CVIM CheatSheet

Keybindings

  • j, s scroll down scrollDown
  • k, w scroll up scrollUp
  • h scroll left scrollLeft
  • l scroll right scrollRight
  • d scroll half-page down scrollPageDown
  •   scroll full-page down	scrollFullPageDown
    
  • u, e scroll half-page up scrollPageUp
  • scroll full-page up scrollFullPageUp