Skip to content

Instantly share code, notes, and snippets.

@carlj
carlj / rsa-encryption.md
Last active February 28, 2020 07:01
RSA large File En- and Decryption

RSA File De- and Encryption

Docu for encrypt and decrypt a large file with AES and RSA

Keypairs

Generate RSA Keypairs

//generates a private Key with 8196 Bit. 
openssl genrsa -out private.pem 8196
@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:

@jvhaarst
jvhaarst / movedigiphotos.bash
Last active December 12, 2022 22:02
Bash script to move images, based on exif data and file timestamp
#!/bin/bash
# Reads EXIF creation date from all .JPG files in the
# current directory and moves them carefully under
#
# $BASEDIR/YYYY/YYYY-MM/YYYY-MM-DD/
#
# ...where 'carefully' means that it does not overwrite
# differing files if they already exist and will not delete
# the original file if copying fails for some reason.
@spikebike
spikebike / client.go
Created March 29, 2012 01:13
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@maraujop
maraujop / forms.py
Created February 15, 2012 19:04
django-crispy-forms bootstrap form example
# -*- coding: utf-8 -*-
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field
from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions
class MessageForm(forms.Form):
text_input = forms.CharField()
@bricef
bricef / lookup-nobatteries.py
Created June 9, 2011 19:01
Python script to carry out a reverse hostname lookup. Version 1: The dummy way.
#!/usr/bin/env python
import sys, re, os, popen2
hosts_locs = [
"/etc/hosts",
"C:/Windows/system32/drivers/etc/hosts"
]
hosts = {}
@schacon
schacon / gist:1
Created July 15, 2008 18:17
the meaning of gist
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.