Skip to content

Instantly share code, notes, and snippets.

View xanoni's full-sized avatar
🐱
I'm a cat

Linus Xanoni xanoni

🐱
I'm a cat
View GitHub Profile
@xanoni
xanoni / testobfs4.py
Created November 2, 2021 00:03 — forked from mrphs/testobfs4.py
testing obfs4 performance
#!/usr/bin/env python
import csv
import datetime
import os
import os.path
import re
import sys
import time
import urllib2
@xanoni
xanoni / cheatsheet.md
Created October 10, 2021 06:44 — forked from masklinn/cheatsheet.md
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,

@xanoni
xanoni / process_names.txt
Created September 9, 2021 06:06 — forked from miguelmota/process_names.txt
macOS process whitelist
# not an exhaustive list
nsurlsessiond "icloud sync"
fseventsd "macos file system events"
WindowServer "macos windows"
DisplayLinkManager "macos driver"
configd "macos dynamic configuration"
displaypolicyd "macos process"
CommCenter "macos keychain"
kernel_task "macos kernel"
@xanoni
xanoni / socat_socks_proxy.sh
Created September 6, 2021 07:18 — forked from lene/socat_socks_proxy.sh
Using tor as SOCKS proxy with SOCAT
socat TCP-LISTEN:<localport> SOCKS4A:localhost:<host>:<remoteport>,socksport=9050
# for example, to ssh into secret.shell.server.org via tor, do:
$ socat TCP-LISTEN:22222 SOCKS4A:localhost:secret.shell.server.org:22,socksport=9050 &
$ ssh localhost -p 22222
@xanoni
xanoni / macos-tmux-256color.md
Created August 12, 2021 05:52 — forked from bbqtd/macos-tmux-256color.md
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlemail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=+lkRo0xHq0A5qPt4Ud4bXvNaQX2AJTwdlR5UthC+VcY=;
b=jau+o2hGzSHgRaoPfJe9eMaxU4Lh7DsSbtV8wQehOE8xaULsl+CoYhZHxXzm8Dr0KW
H5H6up8OANeXTFyBnW35FWBqr6cdCiPbzHCKslHnurBb0/CQ4yinWjahpIbsu35gxfOM
hc1q8r02ahsVyfXrpegxHxv2TjmKEniO0WiXa5ybooZngNJEUdxLwHgPiK7Nnwm7eA8N
/hP1vCBspeaTT2muu22srZkwVygeJiuxUJTewc9bT57LRFQQQ75YELEKIbrL6wwtE7Hf
EGzqdNHJpFvAttioPpSCf54YALz2rKuvrCmEBkFXRa+gyBX2CIDIeqQdzbrRHKiZ10nM
i/Lw==
@xanoni
xanoni / vimdiff.md
Created June 20, 2021 01:53 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@xanoni
xanoni / proxy_for_terminal.md
Created June 11, 2021 07:00 — forked from fearblackcat/proxy_for_terminal.md
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents