Skip to content

Instantly share code, notes, and snippets.

View holishing's full-sized avatar
🌴
On vacation

holishing holishing

🌴
On vacation
View GitHub Profile
@awesomebytes
awesomebytes / simple_debian_repository.md
Last active April 8, 2025 17:25
How to create a simple debian repository with minimal dependences

Simple debian repository

How to have a simple debian repository to offer your packages.

Requirements

You probably have them already installed

  • Python (I used 2.7).
  • dpkg-scanpackages: sudo apt-get install dpkg-dev
  • gzip: sudo apt-get install gzip
@mbreese
mbreese / build-tmux.sh
Last active February 15, 2025 18:34
HOWTO build a statically linked tmux in one script (downloads and builds dependencies from source)
#!/bin/bash
TARGETDIR=$1
if [ "$TARGETDIR" = "" ]; then
TARGETDIR=$(python -c 'import os; print os.path.realpath("local")')
fi
mkdir -p $TARGETDIR
libevent() {
curl -LO https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -zxvf libevent-2.0.22-stable.tar.gz
@mrbar42
mrbar42 / README.md
Last active April 9, 2025 18:03
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@raspi
raspi / pacman-auto-update.service
Last active June 2, 2024 03:19
Arch Linux Pacman auto download updated packages
# Download new packages but don't install them
# Save in /etc/systemd/system/
[Unit]
Description=Pacman Automatic Download (no install) service
After=network-online.target
[Service]
# Wait time if process hangs
TimeoutStopSec=5m
@fumiyas
fumiyas / openssh-build-static.sh
Created October 4, 2017 09:20
Build OpenSSH with static linked zlib and OpenSSL libraries
#!/bin/sh
set -u
set -e
umask 0077
prefix="/opt/openssh"
top="$(pwd)"
root="$top/root"
build="$top/build"
@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active June 26, 2025 19:46
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@Ryanb58
Ryanb58 / install.md
Last active June 19, 2025 17:58
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@kcchien
kcchien / buildVSCode.sh
Last active April 2, 2025 03:31
在 nVidia Jetson Nano 編譯與安裝 VSCode buildVSCode.sh : 編譯與安裝 product.json: 要記得先覆蓋原始碼裡的那一份
# 退出桌面模式,以節省記憶體,不然編譯到一半會有記憶體不足的狀況,造成失敗
# 你的畫面會進入Console 模式,是正常的
sudo systemctl isolate multi-user
# 準備建置原始碼
yarn
# 建置原始碼,這個會要花一些時間,約15~20分鐘
yarn run gulp vscode-linux-arm64-min
yarn run gulp vscode-linux-arm64-build-deb
@bessarabov
bessarabov / gist:674ea13c77fc8128f24b5e3f53b7f094
Last active June 18, 2025 14:48
One-liner to generate data shown in post 'At what time of day does famous programmers work?' — https://ivan.bessarabov.com/blog/famous-programmers-work-time
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
@virus-warnning
virus-warnning / classify.py
Created September 4, 2019 06:39
Classify photos by EXIF attributes, designed for my wife.
"""
Classify photos by EXIF attributes.
Before classified:
DCIM
├── 100ANDRO
│   ├── DSC_2828.JPG
│   └── DSC_2830.JPG
├── 99ANDRO