Skip to content

Instantly share code, notes, and snippets.

RUN apt-get update && apt-get install -y \
packages\
&& rm -rf /var/lib/apt/lists/*
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@soarez
soarez / ca.md
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@mrflip
mrflip / tuning_storm_trident.asciidoc
Last active May 27, 2022 23:59
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
@clly
clly / folderacls.ps1
Created November 30, 2012 23:05
Setting ACLs on a folder
$path = "folder"
$propflag = "None"
$inhflag = [System.Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [System.Security.AccessControl.InheritanceFlags]::ObjectInherit
$user = "DOMAIN\user"
$acl = get-acl $path
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule $user,"FullControl",$inhflag,$propflag,"Allow"
$acl.SetAccessRule($rule)
$acl | Set-Acl $path
@clly
clly / acls.ps1
Created November 30, 2012 20:16
Set access control with powershell
# hello.txt is a file in the current directory
# The group everyone will be added to allow it full control
$group = "Everyone"
$control = "FullControl"
$yesno = "Allow"
$acl = get-acl hello.txt
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule $group,$control,$yesno
$acl.SetAccessRule($rule)
@mathieue
mathieue / udp-multi-socat.sh
Created August 28, 2012 23:57
udp multiplexer with socat
socat - udp4-listen:8125,fork | tee >(socat - udp-sendto:127.0.0.1:8135) >(socat - udp-sendto:127.0.0.1:8140)
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@clly
clly / setDHCP.vbs
Created May 29, 2012 22:00
Set Windows DNS and IP addressing to use DHCP
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNicConfigs = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each obj in colNicConfigs
obj.SetDNSServerSearchOrder(null)
if not obj.DHCPEnabled Then
obj.EnableDHCP