Skip to content

Instantly share code, notes, and snippets.

View ishanjain28's full-sized avatar
🎯
Focusing

Ishan Jain ishanjain28

🎯
Focusing
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@rajkosto
rajkosto / odi_keygen.py
Created November 18, 2022 12:56
ODI SFP XPON stick MAC_KEY generator
#!/usr/bin/env python3
#ODI DFP-34X-2C2 MAC_KEY key generator by rajkosto
import sys
import string
import hashlib
args = sys.argv
if len(args) != 2:
sys.exit("Usage: odi_keygen.py YOURMACADDR")
@gmurdocca
gmurdocca / socat_caesar_dpi.md
Last active January 22, 2024 05:08
Circumventing Deep Packet Inspection with Socat and rot13

Circumventing Deep Packet Inspection with Socat and rot13

I have a Linux virtual machine inside a customer's private network. For security, this VM is reachable only via VPN + Citrix + Windows + a Windows SSH client (eg PuTTY). I am tasked to ensure this Citrix design is secure, and users can not access their Linux VM's or other resources on the internal private network in any way outside of using Citrix.

The VM can access the internet. This task should be easy. The VM's internet gateway allows it to connect anywhere on the internet to TCP ports 80, 443, and 8090 only. Connecting to an internet bastion box on one of these ports works and I can send and receive clear text data using netcat. I plan to use good old SSH, listening on tcp/8090 on the bastion, with a reverse port forward configured to expose sshd on the VM to the public, to show their Citrix gateway can be circumvented.

Rejected by Deep Packet Inspection

I hit an immediate snag. The moment I try to establish an SSH or SSL connection over o

@AHaymond
AHaymond / gist:25587a93094fdffdcdbfeaa90f21337c
Last active April 28, 2024 00:16
Setting up Arch Linux LXC on ProxMox
1. Edit the mirror list located at /etc/pacman.d/mirrorlist and uncomment a preferred mirror (preferrably closest to you)
2. Initialize Pacman GPG Keys
- $> pacman-key --init
- $> pacman-key --populate archlinux
- $> pacman-key --refresh-keys -u --keyserver hkps.pool.sks-keyservers.net
*The use of the --keyserver flag is due to an error that currently occurs when using the default keyserver
3. Reinstall Arch keyring
- $> pacman -S archlinux-keyring
4. Install Yay (if desired)
- Create a user (you cannot run makepkg as root, you must be signed in as a user)
@Matthias247
Matthias247 / async_await_cancellation.md
Created May 28, 2019 06:09
Async/Await - The challenges besides syntax - Cancellation

Async/Await - The challenges besides syntax - Cancellation

This is the second article in a series of articles around Rusts new async/await feature. The first article about interfaces can be found here.

In this part of the series we want to a look at a mechanism which behaves very different in Rust than in all other languages which feature async/await support. This mechanism is Cancellation.

@flipace
flipace / gdpr-list.json
Last active June 23, 2023 11:48
List of URLs where you can request your data according to GDPR/DSGVO laws
[
{ "name": "Amazon", "url": "https://www.amazon.de/gp/help/customer/contact-us?", "note": "Select, in this order: 'Digitale Dienste' -> 'Datenauskunft beantragen' -> 'Datenauskunft für eine spätere Zusendung beantragen' -> 'Daten aus allen Kategorien anfordern' -> Namen eingeben und Nachricht vervollständigen. -- Amazon Support Staff will review your request and send you an email, asking about a postal address. If you don't answer to their mail, your request won't be fulfilled." },
{ "name": "McDonalds", "url": "https://corporate.mcdonalds.com/corpmcd/gdpr-rights-center.html" },
{ "name": "willhaben.at", "url": "https://datenschutz.willhaben.at/" },
{ "name": "Spotify", "url": "https://www.spotify.com/account/privacy/" },
{ "name": "Google", "url": "https://takeout.google.com" },
{ "name": "PlayStation", "email": "dpo@scee.net" },
{ "name": "Humble Bundle", "email": "dpo@humblebundle.com" },
{ "name": "REWE Group AT", "email": "datenschutz@rewe-group.at" },
{ "name": "BILLA", "url": "https:

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@braian87b
braian87b / dumb-ap-wired-link.sh
Last active March 30, 2024 20:21
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE