Skip to content

Instantly share code, notes, and snippets.

Avatar

John Morley Morley93

View GitHub Profile
@Morley93
Morley93 / openvpn.md
Last active Feb 9, 2022
This is how you can take an openvpn .ovpn config file and extract the certificates/key required to import the profile into NetworkManager.
View openvpn.md

OpenVPN .ovpn manipulation.

This is how you can take an OpenVPN .ovpn config file and extract the certificates/keys required to import the profile into NetworkManager.

  • Download the .ovpn file. Save it somewhere you can store it permanently (I use ~/.vpn).
  • Copy from between <ca> tags into ca.crt, remove <ca> tags.
  • Copy from between <cert> tags into client.crt, remove <cert> tags.
  • Copy from between <key> tags into client.key, remove <key> tags.
  • Copy from between <tls-auth> tags into ta.key, remove <tls-auth> tags.
  • Remove the line "key-direction 1"
  • Above "# -----BEGIN RSA SIGNATURE-----" insert the following lines.
@Morley93
Morley93 / tmux_mouse.conf
Created Apr 2, 2017
tmux mouse configuration
View tmux_mouse.conf
# Mouse settings
set -g mouse on
# Scroll faster than line-by-line
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" \
"send-keys -M; send-keys -M; send-keys -M; send-keys -M" \
"if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' \
'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"
bind -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" \
"send-keys -M; send-keys -M; send-keys -M; send-keys -M" \
View createUsers.sh
#!/bin/sh
# Creates some users from a file with a default password
xargs -n1 sudo useradd -g users -m -s /bin/bash < $1
xargs -n1 -I{} echo "{}:Password1" < users.txt | sudo chpasswd
@Morley93
Morley93 / sddmPam
Last active Jan 3, 2016
Append this to the end of /etc/pam.d/sddm to stop a keyring prompt whenever logging in in range of uni wifi.
View sddmPam
-auth optional pam_gnome_keyring.so
-session optional pam_gnome_keyring.so auto_start