Skip to content

Instantly share code, notes, and snippets.

@aimeemikaelac
aimeemikaelac / .vimrc
Last active November 27, 2016 01:41
My .vimrc
filetype indent plugin on
set autoindent
set visualbell
set mouse=a
set number
set pastetoggle=<F10>
let g:vim_markdown_folding_disabled=1
" Don't try to be vi compatible
set nocompatible
@aimeemikaelac
aimeemikaelac / ntopng.service
Created January 18, 2017 21:16
ntopng systemd service
[Unit]
Description=ntopng
After=mysql.service
[Service]
Type=simple
ExecStartPre=/bin/mkdir -p /var/run/ntopng
ExecStartPre=/bin/touch /var/run/ntopng/ntopng.pid
ExecStartPre=/bin/chmod 777 /var/run/ntopng
ExecStartPre=/bin/chmod 777 /var/run/ntopng/ntopng.pid
@aimeemikaelac
aimeemikaelac / resilio.conf
Created January 18, 2017 21:22
resilio sync conf
{
"device_name": "?",
"listening_port" : 0, // 0 - randomize port
/* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in the directory
where binary is located. otherwise user-defined directory will be used */
"storage_path" : "/scratch/resilio",
"directory_root" : "/scratch/resilio",
/* set location of pid file */
@aimeemikaelac
aimeemikaelac / resilio.service
Created January 18, 2017 21:24
resilio sync systemd service
[Unit]
Description=resilio sync
[Service]
Type=forking
ExecStartPre=/bin/mkdir -p /var/run/resilio
ExecStartPre=/bin/touch /var/run/resilio/resilio.pid
ExecStartPre=/bin/chmod 777 /var/run/resilio
ExecStartPre=/bin/chmod 777 /var/run/resilio/resilio.pid
ExecStart=/bin/su -c '/home/<user>/resilio/rslsync --config /home/<user>/resilio/resilio.conf' <user>
@aimeemikaelac
aimeemikaelac / devicetree.dts
Created January 19, 2017 23:37
basic zedboard device tree with UIO
/dts-v1/;
/ {
compatible = "xlnx,zynq-7000";
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <0x1>;
model = "Xilinx Zynq ZED";
aliases {
@aimeemikaelac
aimeemikaelac / xstartup
Created April 19, 2017 01:03
vnc server xstartup script in ~/.vnc/xstartup. Requires autocutsel so that copy/paste works correctly over vnc
#!/bin/bash
xrdb $HOME/.Xresources
autocutsel -fork
startxfce4 &
@aimeemikaelac
aimeemikaelac / .tmux.conf
Last active October 21, 2020 18:11
tmux conf
#http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
set -g mouse on
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
@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
@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 / 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%%