Skip to content

Instantly share code, notes, and snippets.

View h3ndrk's full-sized avatar

Hendrik h3ndrk

View GitHub Profile
@umpirsky
umpirsky / A.markdown
Last active August 3, 2023 18:14 — forked from olivierlacan/An_example.markdown
Sublime Text Monokai Sidebar Theme.
@plentz
plentz / nginx.conf
Last active July 22, 2024 11:19
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@darrenmothersele
darrenmothersele / gist:7597016
Created November 22, 2013 09:06
Sending base64 encoded data via HTTP in C++ using openFrameworks and Poco Net Libraries
// The main openFrameworks include
#include "ofMain.h"
// Poco is included in openFrameworks 0.8.0
#include "Poco/Net/HTTPClientSession.h"
#include "Poco/Net/HTTPRequest.h"
#include "Poco/Net/HTTPResponse.h"
#include "Poco/Base64Encoder.h"
#include "Poco/Net/HTMLForm.h"
#include "Poco/Net/StringPartSource.h"
#include "Poco/StreamCopier.h"
@ncw
ncw / README.txt
Last active February 20, 2024 19:30 — forked from spikebike/client output
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go
@ismasan
ismasan / sse.go
Last active July 21, 2024 12:23
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@jirutka
jirutka / -README.md
Last active March 15, 2021 04:07
Btrfs in RAID1 as a root filesystem on Gentoo

Btrfs in RAID1 as a root filesystem on Gentoo

Partitioning scheme

Partition Filesystem Size Description
sd*1 ext2 (md/raid1) 256 MiB boot (kernel etc.)
sd*2 sw (md/raid1) 4 GiB swap
sd*3 Btrfs (raid1) * Btrfs
# Creating keys
#
cp -rv /usr/share/doc/openvpn/examples/easy-rsa/2.0/ /config/easy-rsa2
# Edit vars
vi /config/easy-rsa2/vars
cd /config/easy-rsa2/
source ./vars
@danechitoaie
danechitoaie / app_virtualenv.service
Created November 16, 2015 23:00
Virtualenv Systemd Service
[Unit]
Description=Python Virtualenv service example
After=network.target
[Service]
User=my_user
Group=my_group
Environment=VIRTUAL_ENV=/home/my_user/.virtualenvs/my_venv
Environment=PATH=$VIRTUAL_ENV/bin:$PATH
ExecStart=$VIRTUAL_ENV/bin/my_entrypoint
#!/bin/vbash
# CONFIG
wan=dhcp
lan=192.168.1.1
lan_segment=192.168.1.0
vpn_segment=192.168.5.0
domain=apertoire.org
lease_start=192.168.1.200
lease_stop=192.168.1.245