Skip to content

Instantly share code, notes, and snippets.

View maogongzi's full-sized avatar

Gat maogongzi

View GitHub Profile
@deomorxsy
deomorxsy / EFI-partition.md
Created September 3, 2020 02:39
EFI partition basic configuration with Parted and mkfs.fat

Creating partition

mkpart "EFI system partition" fat32 33MiB 512MiB

Setting partition flag for boot

set 1 esp on
@legeana
legeana / nftables.conf
Last active December 19, 2025 20:03
nftables port forwarding + wireguard
table inet nat {
chain prerouting {
type nat hook prerouting priority dstnat;
iifname eth0 jump external-pre
}
chain external-pre {
tcp dport 8022 mark set 1 dnat ip to 10.200.200.2:ssh
tcp dport 8022 mark set 1 dnat ip6 to [fd00::2]:ssh
tcp dport 8080 mark set 1 dnat ip to 10.200.200.2:http

Hardware specs

Chinese Brand "ITworks" , Model TW891, distributed in France and Belgium by Darty

  • CPU: Intel(R) Atom(TM) CPU Z3735F @ 1.33GHz
  • Video: Intel® HD Graphics for Intel Atom® Processor Z3700 Series
  • Screen: 1280x800
  • WiFi + BT: Realtek RTL8723BS_BT
  • Disks: mmcblk1: mmc1:0001 DF4032 29.1 GiB
  • RAM: 2GB DDR3 @ 1333 MHz
@777777miSSU7777777
777777miSSU7777777 / mp3_to_hls.sh
Last active October 9, 2025 04:23
Transcode mp3 to hls stream via ffmpeg.
ffmpeg \
-i audio_name.mp3 \
-vn -ac 2 -acodec aac \
-f segment -segment_format mpegts -segment_time 10 \
-segment_list audio_pl.m3u8 \
audio_segment%05d.ts
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active May 4, 2026 19:24 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@willwhui
willwhui / 将路由器刷为OpenWrt
Created July 3, 2018 01:43
将路由器刷为OpenWrt
将路由器刷为OpenWrt
@paulsturgess
paulsturgess / service.js
Last active March 15, 2026 18:46
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}
@jfstenuit
jfstenuit / Installing_linux_on_Baytrail_tablet.md
Last active March 8, 2026 20:36
Installing Linux on a Baytrail tablet

Hardware specs

Chinese Brand "ITworks" , Model TW891, distributed in France and Belgium by Darty

  • CPU: Intel(R) Atom(TM) CPU Z3735F @ 1.33GHz
  • Video: Intel® HD Graphics for Intel Atom® Processor Z3700 Series
  • Screen: 1280x800
  • WiFi + BT: Realtek RTL8723BS_BT
  • Disks: mmcblk1: mmc1:0001 DF4032 29.1 GiB
  • RAM: 2GB DDR3 @ 1333 MHz
@yusupova
yusupova / rails-puma.service
Created January 28, 2017 12:27
systemd service to start your Rails app with Puma
# /etc/systemd/system/rails-puma.service
# rvm wrapper default systemd rails
# systemctl enable rails-puma
# systemctl start rails-puma
[Unit]
Description=Rails Puma Webserver
Wants=network-online.target
After=network.target network-online.target

在 DLNA SERVER直接相连的路由器运行

iptables -t mangle -I PREROUTING -d 239.255.255.250/32 -j TEE --gateway 192.168.0.101

192.168.0.101是 DLNA 播放设备的 IP

至于在192.168.0.0/24网段广播,可能需要两个路由器都对 DLNA 通告特殊处理