Skip to content

Instantly share code, notes, and snippets.

View tru2dagame's full-sized avatar
💭
🏀

Tru tru2dagame

💭
🏀
  • Ubiquiti
  • Shanghai
View GitHub Profile
@tru2dagame
tru2dagame / surge.conf
Created October 5, 2015 17:05
Yet another config for Surge.app
[General]
# warning, notify, info, verbose
loglevel = notify
[Proxy]
# http, https, socks5
# SSLedge 代理推荐使用 TLS_RSA_WITH_AES_128_GCM_SHA256 Ciphers
Proxy = custom, 1.2.3.4, 443, rc4-md5, password, http://server/custom.module
[Rule]
@tru2dagame
tru2dagame / LICENSE.txt
Created January 10, 2016 05:36 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tru2dagame
tru2dagame / docker-tinc.md
Created March 24, 2017 18:59 — forked from noteed/docker-tinc.md
Docker - Tinc setup
@tru2dagame
tru2dagame / wheezy-mips-toolchain
Created May 4, 2017 02:59 — forked from fgrep/wheezy-mips-toolchain
Debian wheezy mips toolchain
# Debian 7 MIPS Toolchain
# http://cdimage.debian.org/cdimage/archive/7.8.0/amd64/iso-cd/debian-7.8.0-amd64-CD-1.iso
# Basic install + SSH Server + Standard system utilities
# Update
mkdir /usr/src/mips-toolchain && cd /usr/src/mips-toolchain
apt-get update
apt-get upgrade
# Binutils
@tru2dagame
tru2dagame / readme.md
Created April 6, 2018 09:06
Extract mkv to get the built-in subtitle
brew install --with-qt5 mkvtoolnix
mkvextract movie.mkv chapters --simple "My Chapters.txt" tracks -c MS-ANSI "2:My Subtitles.srt"
@tru2dagame
tru2dagame / readme.md
Created April 20, 2018 05:59
sysctl -p
sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.all.arp_notify = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
@tru2dagame
tru2dagame / open_file_with_emacsclient.scpt
Last active February 16, 2020 18:23
Use apple script to open the selected file in finder with emacscilent
-- get the file path from the finder
tell application "Finder" to set theItems to selection
set thePaths to ""
repeat with i in theItems
set thisItem to POSIX path of (i as alias)
set thePaths to thePaths & thisItem & return
end repeat
set filePath to thePaths
-- remove \n of the file path
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name yourdomain
ssl_certificate /etc/ssl/localcerts/yourdomain.crt;
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key;
ssl_ecdh_curve prime256v1;
ssl_session_cache builtin:1000 shared:SSL:10m;
@tru2dagame
tru2dagame / readme.md
Created July 26, 2019 09:58
ffmpeg youtube-dl

Youtube-dl part

go into download folder

cd ~/Downloads/

a. download directly by default settings (Most of these are 1280x720)

@tru2dagame
tru2dagame / README.md
Created January 13, 2021 17:45 — forked from nwade/README.md
Remove SentinelOne Agent - macOS High Sierra/Mojave

Warning - use at your own risk

Remove SentinelOne agent from Mac

  1. Boot into Recovery Mode by holding Cmd+R during reboot
  2. Open Terminal from top menubar
  3. Run /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility to open Disk Utility
  4. If your startup disk is encrypted, use Disk Utility to mount it
  5. In Terminal, run chroot /Volumes/Macintosh\ HD
  6. Execute the deletion commands or script