Skip to content

Instantly share code, notes, and snippets.

View cjs's full-sized avatar

Craig Steinberger cjs

View GitHub Profile
@mislav
mislav / unifi-controller-cert.sh
Last active August 27, 2024 01:55
Figuring how to assign your own SSL certificate to be used by the Unifi Controller web interface
hostname="MYHOST" # set this to where the Unifi Controller is served from
root_ca="rootCA.pem"
root_ca_key="rootCA.key"
cert="unifi.pem"
cert_key="unifi.key"
# these don't really matter
csr="unifi.csr"
pfx_password="whatever"
@martinwoodward
martinwoodward / create-org-montage.sh
Last active August 22, 2022 14:12
Very quick ruby script to create a bash script that will create a montage of your org.
# Set OCTOKIT_ACCESS_TOKEN to authenticate with a PAT
# Something like OCTOKIT_ACCESS_TOKEN=<<TOKEN>> bundle exec ruby create-org-montage-script.rb
require "octokit"
Octokit.auto_paginate = true
# Replace <<ORG_NAME>> with your GitHub org
members = Octokit.org_members "<<ORG_NAME>>"
@alisdair
alisdair / intensify.sh
Created May 21, 2019 23:44
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
@pnigos
pnigos / json-deserialization-ldap.sh
Created August 18, 2018 02:40 — forked from topolik/json-deserialization-ldap.sh
Backend script based on @pwntester JSON deserialization research
#!/bin/bash
echo "Starting Apache DS using docker @ ldap://localhost:10389"
docker run --name json-deser-ldap -d -p 10389:10389 greggigon/apacheds
echo "... waiting 20 seconds to start Apache DS"
sleep 20
# password: secret, if used with LDAP login
(cat <<"EOF"
@rcapraro
rcapraro / README.md
Last active May 25, 2018 16:51
Keycloak sandbox

Docker images

Postgres docker image

docker run --name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=password -e POSTGRES_ROOT_PASSWORD=root_password -d postgres

Keycloak docker image

docker run --name keycloak --link postgres:postgres -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak-postgres

Obtain a token

curl --data "grant_type=password&amp;client_id=curl&amp;username=richard&amp;password=password" http://localhost:8080/auth/realms/master/protocol/openid-connect/token

/* $OpenBSD: sshconnect.h,v 1.29 2015/11/15 22:26:49 jcs Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@dorkmatt
dorkmatt / gist:e728a6f50372d710186c2b75e3b10477
Created September 22, 2016 01:04
Ansible DNSMadeEasy example
---
- name: "DNSMadeEasy example"
hosts: localhost
vars:
dnsmadeeasy_api_key: "YOUR API KEY" # https://cp.dnsmadeeasy.com/account/info
dnsmadeeasy_api_secret: "YOUR API SECRET"
dns_entries:
- { record_name: '10', record_type: 'PTR', record_value: 'xe-2-0-1.sfo01.example.net.', domain: '2.0.192.in-addr.arpa' }
.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go
@grugq
grugq / gist:03167bed45e774551155
Last active April 15, 2025 11:22
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@L422Y
L422Y / osx_automount_nfs.md
Last active April 22, 2025 07:43
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service