Skip to content

Instantly share code, notes, and snippets.

@aimeemikaelac
aimeemikaelac / ubuntu_provisioning.sh
Last active October 21, 2020 18:12
basic provisioning script
#!/bin/bash
cd $HOME
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
// .tmux.conf
wget https://gist.githubusercontent.com/aimeemikaelac/191c44809e8838e231eb4337cd408834/raw/e274b66eee8ceb8bca9f3d2ac6991a8527c14c6d/.tmux.conf -O $HOME/.tmux.conf
// .vimrc
@aimeemikaelac
aimeemikaelac / vncserver@.service
Created March 2, 2019 01:29
vnc server systemd config
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=aimee
PAMName=login
PIDFile=/home/aimee/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
@aimeemikaelac
aimeemikaelac / history.txt
Created March 2, 2019 01:24
creating a custom resource in ubuntu maas
687 maas
689 maas --help
690 maas login aimee http://172.20.76.36:5420/MAAS
691 maas login aimee http://localhost:5420/MAAS/
692 maas login aimee http://localhost:5240/MAAS/
693 maas aimee boot-sources read
731 maas aimee boot-resources
732 maas aimee boot-resources create name=test title="title" filetype=iso content=@/home/aimee/Downloads/vyatta-vnf-17.2.0_amd64.iso architecture=amd64/generic
733 maas aimee boot-resources create name=custom/test title="title" filetype=iso content=@/home/aimee/Downloads/vyatta-vnf-17.2.0_amd64.iso architecture=amd64/generic
734 maas aimee boot-resources create name=custom/test title="title test" content=@/home/aimee/Downloads/vyatta-vnf-17.2.0_amd64.iso architecture=amd64/generic

Keybase proof

I hereby claim:

  • I am aimeemikaelac on github.
  • I am aimeemc (https://keybase.io/aimeemc) on keybase.
  • I have a public key ASBlknh6LAZUoq6Oc0Cm5LOoAm34aupcQIUH8pHApr0_hwo

To claim this, I am signing this object:

@aimeemikaelac
aimeemikaelac / maas-http.conf
Created May 16, 2018 19:13
config for maas for nsr
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLEngine On
# Do not rely on these certificates, generate your own.
SSLCertificateFile /etc/ssl/certs/172.20.76.36.cert.pem
SSLCertificateKeyFile /etc/ssl/private/172.20.76.36.key.pem
</VirtualHost>
</IfModule>
<IfModule mod_expires.c>
@aimeemikaelac
aimeemikaelac / install_nuclide_server.sh
Last active January 19, 2018 22:48
installs a nuclide server with correct version of node.js and correct libfolly commit
#!/bin/bash
set -e
SCRIPT=$(realpath $0)
SCRIPTPATH=$(dirname $SCRIPT)
CURRENT=$(pwd)
if [ -z "$1" ];
then
@aimeemikaelac
aimeemikaelac / v3_ip.ext
Created May 19, 2017 09:32
Needed for IP TLS cert script
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
IP.1 = %%DOMAIN%%
@aimeemikaelac
aimeemikaelac / v3.ext
Created May 19, 2017 09:32
Needed for domain TLS cert script
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = %%DOMAIN%%
@aimeemikaelac
aimeemikaelac / create_certificate_for_ip.sh
Created May 19, 2017 09:31
Create an HTTPS TLS cert with subjectAltName set, but this time for an ip address. See other gist about creating one for a domain
#!/bin/bash
#https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate/43666288#43666288
if [ -z "$1" ]
then
echo "Please supply a subdomain to create a certificate for";
echo "e.g. www.mysite.com"
exit;
fi
@aimeemikaelac
aimeemikaelac / create_certificate_for_domain.sh
Created May 19, 2017 09:28
My updated version of a script to create an HTTPS TLS cert that has subjectAltName set correctly for a domain. See the stackoverflow post in the comments. Requires a 4096 RSA key for the device, and a root CA key and cert to already exist
#!/bin/bash
#https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate/43666288#43666288
if [ -z "$1" ]
then
echo "Please supply a subdomain to create a certificate for";
echo "e.g. www.mysite.com"
exit;
fi