Skip to content

Instantly share code, notes, and snippets.

View mrphs's full-sized avatar

Nima Fatemi mrphs

View GitHub Profile
@mrphs
mrphs / luks-partition.md
Last active January 18, 2017 01:22
How to setup an encrypted partition with LUKS (cryptsetup)

Step 0

$ sudo apt-get install cryptsetup

Step 1

use 'lsblk' to get the list of available devices $ lsblk sample output:

NAME  MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 202:1 0 8G 0 disk /
@mrphs
mrphs / testobfs4.py
Last active January 16, 2023 18:12
testing obfs4 performance
#!/usr/bin/env python
import csv
import datetime
import os
import os.path
import re
import sys
import time
import urllib2
root@home:~# curl -vvvv listeomid.org
* About to connect() to listeomid.org port 80 (#0)
* Trying 10.10.34.36...
* connected
* Connected to listeomid.org (10.10.34.36) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.26.0
> Host: listeomid.org
> Accept: */*
>
@mrphs
mrphs / extract_obfs4_port.sh
Created October 5, 2016 19:34
Handy script to extract the obfs4 randomly assigned port
#!/bin/bash
TOR_LOG=/var/lib/log/tor/log
OBFS4_PORT=`while read line; do; if [[ $line =~ .*obfs4.*\'\[::\]:([0-9]+).* ]]; then echo "${BASH_REMATCH[1]}"; fi; done < $TOR_LOG`
echo $OBFS4_PORT
@mrphs
mrphs / AMKS-prompt.txt
Last active June 29, 2023 21:40
Advanced Multidisciplinary Knowledge System prompt for gpt-4. This puts chatgpt into a panel of experts who work to get you the best results.
Author: Nima Fatemi @mrphs
Date: June 2023
Permanent link:
https://gist.github.com/mrphs/22564aea824f885ce063b6213218a21c
Description:
============
The prompt guides the GPT-4 model to adopt the Advanced Multidisciplinary
Knowledge System (AMKS) mode. It emphasizes critical thinking, questioning