Skip to content

Instantly share code, notes, and snippets.

@stevenhaddox
stevenhaddox / server_certificates_to_pem.md
Last active May 8, 2024 07:13
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hostname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hostname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample

@acdha
acdha / carbon-cache.conf
Last active March 20, 2022 02:02
Upstart config for Graphite's carbon-cache daemon
#!/etc/init/carbon-cache.conf
description "Carbon server"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
umask 022
expect fork
respawn
@cwacek
cwacek / cobbler-uefi-pxe-rhel.md
Last active January 17, 2022 21:26
A description of how to make Cobbler, PXE, and UEFI behave for Red Hat Enterprise Linux 6 installations

UEFI PXE Installation of RHEL6.4

For some reason, starting a PXE boot installation of RHEL6.4 on UEFI systems is poorly documented. Simultaneously, the process is not terribly verbose when it fails. Here's what I had to do to get this to work.

We going to use Cobbler to take care of a lot of the gruntwork (TFTP, DHCP, etc). It's entirely possible to do it without Cobbler, but even accounting for its warts it will make you more

@XVilka
XVilka / TrueColour.md
Last active June 10, 2024 17:21
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@martinsbalodis
martinsbalodis / docker-compose.yml
Created March 1, 2017 13:09
Example of logging with docker gelf logger to logstash
---
version: '3'
services:
elasticsearch:
image: elasticsearch:5
kibana:
image: kibana:5
ports:
- "5601:5601"
logstash:

Forward GnuPG agent from macOS to Linux

On the remote machine

Run gpg once as your to create the directory structure

gpg --list-keys

For headless systemd based hosts

@Millnert
Millnert / recovery.txt
Created May 5, 2018 12:42
ceph recovery when FUBAR (mem / cpu looping crashing OSDs with OOM)
## Stop all OSDs
## Set OSD nodown
ceph osd set nodown
##Set OSD nobackfill
ceph osd set nobackfill
@omiq
omiq / python-scad.py
Created July 11, 2018 01:32
Load and modify an STL file and add text using Python
import os
from solid import *
from PIL import Image
def assembly(annotation=""):
a = import_stl("base.stl") + translate([5, -37, 10])(
linear_extrude(height=2, convexity=4)(
text(annotation,
@darksidelemm
darksidelemm / STRF_Setup.md
Last active December 2, 2023 02:27
Setting up STRF Capture & Processing

Setting up STRF Data Capture & Processing

Author: Mark Jessop (VK5QI) vk5qi@rfhead.net

This guide provides information on how to capture FFT data using the strf toolset, process it to look for satellite signals, and finally compare their doppler shift against TLEs from the SpaceTrack database. This can help with resolving the 'TLE lottery' after new launches, or cataloguing transmissions from spacecraft already in orbit.

It should be noted that the analysis described in this document is but a small subset of what the strf tools are capable of! Scott Tilley has a post describing some of the history behind strf and giving a crash course on the relationship between orbital dynamics and the doppler effect here: https://skyriddles.wordpress.com/2019/01/04/basic-orbital-dynamics/

The target platform is Debian-based distributions (e.g. Debian, Raspbian, Ubuntu), but should be applicable to other Linux-based platforms. The data processing software (rfplot and rffit) is also k