Skip to content

Instantly share code, notes, and snippets.

@paschott
paschott / Generate-CSR.ps1
Created November 24, 2020 22:38
PowerShell script to generate a Certificate Request for a server using certain criteria
#Create new Certificate Request for SQL Server security
# Should be made into a function at some point
# Needs to be able to handle Cluster names/IP addresses
#Set location of the server
$Location = "City"
$State = "State"
$OU = "OU"
$Company = "Organization"
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active November 3, 2025 12:30
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@nabla-c0d3
nabla-c0d3 / client_auth.md
Created February 25, 2018 01:48 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@posener
posener / go-shebang-story.md
Last active October 2, 2025 23:42
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@tanaikech
tanaikech / submit.md
Last active October 19, 2025 17:16
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@subfuzion
subfuzion / curl.md
Last active October 11, 2025 00:58
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@hammady
hammady / csv2webcards.erb
Created April 19, 2015 12:30
Simple ERB template to convert CSV rows to HTML cards
<!--
If your input file is in Excel format, use xlsx2csv python tool available at
https://github.com/dilshod/xlsx2csv
Usage is simple, you need ruby installed (including erb)
rename the input file to input.csv, then just run:
erb csv2webcards.erb > output.html
Now open output.html in any browser to see the HTML cards
Author: Hossam Hammady (github@hammady.net)
-->
@aseering
aseering / ntlmdecoder.py
Last active March 12, 2025 11:27
NTLM auth-string decoder
#!/usr/bin/env python
## Decodes NTLM "Authenticate" HTTP-Header blobs.
## Reads the raw blob from stdin; prints out the contained metadata.
## Supports (auto-detects) Type 1, Type 2, and Type 3 messages.
## Based on the excellent protocol description from:
## <http://davenport.sourceforge.net/ntlm.html>
## with additional detail subsequently added from the official protocol spec:
## <http://msdn.microsoft.com/en-us/library/cc236621.aspx>
##
@y3dips
y3dips / Proxychaini386osx
Last active April 14, 2020 23:33
Proxychain (OSX Brew) won't work with i386 apps by default
bash-3.2$ proxychains4 nmap -sT -vv -p22 10.0.60.205
[proxychains] config file found: /usr/local/Cellar/proxychains-ng/4.7/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.7/lib/libproxychains4.dylib
dyld: could not load inserted library '/usr/local/Cellar/proxychains-ng/4.7/lib/libproxychains4.dylib' because no suitable image found. Did find:
/usr/local/Cellar/proxychains-ng/4.7/lib/libproxychains4.dylib: mach-o, but wrong architecture
Trace/BPT trap: 5
bash-3.2$ file /usr/local/Cellar/proxychains-ng/4.7/lib/libproxychains4.dylib
/usr/local/Cellar/proxychains-ng/4.7/lib/libproxychains4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
require "formula"
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.