Skip to content

Instantly share code, notes, and snippets.

View Gerifield's full-sized avatar

Gergely Radics Gerifield

View GitHub Profile
@regulad
regulad / .env
Created June 18, 2023 21:54
SOCKS5 Proxy using Tailscale Exit Node
TS_AUTHKEY=ts-auth-yattayatta
@1player
1player / mullvad.sh
Last active December 8, 2022 21:42
Script to set up Mullvad VPN from Wireguard config files (+ Tailscale VPN support)
#!/bin/bash
#
# Requires: wg-quick from wireguard-tools package.
#
# How to configure: go on your Mullvad account page and download the
# Wireguard configuration for all countries.
# Unpack the archive at $HOME/.config/mullvad/
#
# Then run `mullvad.sh up <2-char country code>`
# and `mullvad.sh down` to tear it down.
@mayankcpdixit
mayankcpdixit / proxy-server-with-tls.md
Last active April 23, 2021 13:25
Using TLS in grpc-gateway

Using TLS in grpc-gateway

In GRPC client

By default DialOption{grpc.WithInsecure()} is used in example. And as docs mention you just need to replace WithInsecure with transport creds.

//opts := []grpc.DialOption{grpc.WithInsecure()}
creds, _ := credentials.NewClientTLSFromFile("tls.crt", "")
opts := []grpc.DialOption{grpc.WithTransportCredentials(creds)}

In HTTP server

@bnagy
bnagy / gpgmutt.md
Last active March 30, 2024 07:52
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@naftulikay
naftulikay / makeqrs.py
Created April 30, 2014 05:02
Create QR Codes from a Google Authenticator SQLite Database
#!/usr/bin/env python2.7
import argparse
import os
import qrcode
import qrcode.image.pil
import sqlite3
import sys
import urllib
@dannvix
dannvix / intercept-https-with-python-mitmproxy.md
Last active February 16, 2023 02:43
Intercept and manipulate HTTPs traffic with Python and mitmproxy

Intercepts HTTPs Traffic with Python & mitmproxy

Warning

This Gist is created in 2014, and it's highliy outdated now, according to one of mitmproxy's manjor contributor (check his comment below). Thanks for letting us know, @mhils!

Introduction

Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.

@zulak
zulak / PebbleIntentsActivity.java
Created March 14, 2013 22:21
Sample code demonstrating how to use some of the intents supported by Pebble's Android app.
package com.getpebble.example;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
import android.view.View;