Skip to content

Instantly share code, notes, and snippets.

View rafaelfoster's full-sized avatar

Rafael Foster rafaelfoster

View GitHub Profile
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 25, 2024 20:06
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@flabbergastedbd
flabbergastedbd / gencert.py
Last active June 29, 2017 21:41
A python script which generates certificates and signs them using a specified CA.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gencert.py
#
# Copyright 2013 tunnelshade <blog.tunnelshade.in>
#
# * openssl genrsa -des3 -out ca.key 1024
#
# * openssl req -new -x509 -days 3650 -key ca.key -out ca.crt
@radmen
radmen / README.md
Created September 10, 2012 08:15
Apache vhost config for gitlab

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_balancer
@toolness
toolness / gencert.py
Last active June 22, 2023 11:52
Python script to create server SSL certs and sign them with a custom CA.
#! /usr/bin/python
"""
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
in http://www.tc.umn.edu/~brams006/selfsign.html.
Before using this script, you'll need to create a private
@adam-nielsen
adam-nielsen / get-dell-warranty.sh
Last active January 7, 2019 22:20
Shell script for retrieving Dell warranty expiration by service tag
#!/bin/sh
# Warranty request script for Dell PCs
# Written by Adam Nielsen <adam.nielsen@uq.edu.au>
# This code is in the public domain, and is supplied with no warranty.
#
# This script uses Dell's web service to retrieve the most distant warranty expiration
# date for a given machine, as identified by its service tag. It requires curl and awk.
# It doesn't parse the WSDL or anything nice like that, it just sends a precomposed
# request to the server and extracts the relevant info from the response.
@eskil
eskil / m2crypto-certificates.py
Created April 8, 2012 17:07
Example of generating CA certs and CA signed certs using python m2crypto.
"""
Tools for creating a CA cert and signed server certs.
Divined from http://svn.osafoundation.org/m2crypto/trunk/tests/test_x509.py
The mk_temporary_xxx calls return a NamedTemporaryFile with certs.
Usage ;
# Create a temporary CA cert and it's private key
cacert, cakey = mk_temporary_cacert()