Skip to content

Instantly share code, notes, and snippets.

View Izumiko's full-sized avatar

OxO Izumiko

  • BUAA
  • China
  • 23:33 (UTC +08:00)
View GitHub Profile
@rijieli
rijieli / Download Twitter Spaces Audio.md
Last active November 13, 2024 23:13
Download Twitter Spaces Audio By URL

python -m venv .venv

source .venv/bin/activate

pip install m3u8downloader

downloadm3u8 -o foo.mp4 spaces_m3u8_url

ffmpeg -i foo.mp4 -b:a 192K -vn bar.mp3

@jo-makar
jo-makar / pxeboot.md
Last active May 28, 2024 17:42
Setup a PXE boot server

Setup a PXE boot server

Using dnsmasq (on Debian)

apt-get install dnsmasq pxelinux syslinux-common syslinux-efi

mkdir /srv/tftpboot

ln -s /usr/lib/PXELINUX/pxelinux.0 /srv/tftpboot/
@chutsu
chutsu / Eigen Spline Module 1D Example.md
Last active August 18, 2024 19:11
Eigen Spline Module 1D Example

Eigen has an unsupported spline module where you can fit a spline given some data. Once a spline is fitted you can use it as a function to obtain points inbetween. The following example fits 1D data but can be modified to fit N-dimensional data.

Usage

 git clone https://gist.github.com/chutsu/815c7c916c329eec85f34690a012f7cb spline_example
 g++ -I/usr/include/eigen3 spline_example.cpp -o spline_example

./spline_example

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 18, 2024 01:03
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@samueljon
samueljon / toggleHT.sh
Last active November 5, 2024 10:00
Disable / Enable HyperThreading cores on runtime - linux
#!/bin/bash
HYPERTHREADING=1
function toggleHyperThreading() {
for CPU in /sys/devices/system/cpu/cpu[0-9]*; do
CPUID=`basename $CPU | cut -b4-`
echo -en "CPU: $CPUID\t"
[ -e $CPU/online ] && echo "1" > $CPU/online
THREAD1=`cat $CPU/topology/thread_siblings_list | cut -f1 -d,`
@snakevil
snakevil / router.pi-2.md
Last active September 27, 2023 02:25
使用树莓派3B打造超强路由之二:初成

使用树莓派3B打造超强路由之二:初成

通过第一篇《使用树莓派3B打造超强路由之一:初装》的努力,树莓派3B已经可以作为一台超低能耗、随身携带的开发用服务器来使用了。但这对于目标——打造超强路由而言,才刚刚开始。接下来,我们需要将其打磨成一台基本的无线路由器。

WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!

@enjalot
enjalot / cors_server.py
Created June 10, 2012 06:19
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or