Skip to content

Instantly share code, notes, and snippets.

View agajdosi's full-sized avatar

Andreas Gajdosik agajdosi

View GitHub Profile
@agajdosi
agajdosi / https-proxy.py
Created February 28, 2023 10:25
Automated creation of HTTPS proxy from python script using the proxy.py module. The private and public keys are automatcally created by the script. Practical for the testing purposes, squishy squid no longer needed.
import os
import time
import proxy
from proxy.common import pki
PASSWORD = '12dadadadlkahdlashjdlasdlalsdhlh3'
SUBJECT = '/CN=localhost'
@agajdosi
agajdosi / login.go
Created February 6, 2023 15:27
Login validation and cookie generation in Go for Digital Ocean functions
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"net/http"
"os"
"time"
@agajdosi
agajdosi / phabricator-nginx-setup-centos8.txt
Created March 14, 2020 21:37
How to setup phabricator on Centos8 with Nginx.
What diverts from the official manual:
Install phabricator into: `/var/www/html`
- other locations conflicts with selinux, causes `file not found` errors
By default the php-fpm listens on unit socket, this causes `bad gateway error`, to fix:
- configure php-fpm to listen on port 9000, config at: `/etc/php-fpm.d/www.conf`
- configure nginx in `/etc/nginx/nginx.conf` to pass to unix socket, its location is: `unix:/run/php-fpm/www.sock`
- start and enable php-fpm: `systemctl start php-fpm`, `systemctl enable php-fpm`