Skip to content

Instantly share code, notes, and snippets.

@xevz
xevz / omada.service
Created February 19, 2024 14:36
TP-Link Omada SDN Controller systemd service
[Unit]
Description=TP-Link Omada SDN Controller
After=network.target
[Service]
User=omada
Group=omada
EnvironmentFile=-/etc/default/omada
Environment=OMADA_HOME=/opt/tplink/EAPController
Environment=LOG_DIR=${OMADA_HOME}/logs

Keybase proof

I hereby claim:

  • I am xevz on github.
  • I am xevz (https://keybase.io/xevz) on keybase.
  • I have a public key ASDZ-FU02H8SUKYbCOxzWHjYXh8nmfax-Zpk8Czt-uUYxwo

To claim this, I am signing this object:

@xevz
xevz / ssh-copy-id.sh
Last active December 22, 2015 13:23
ssh-copy-id
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
@xevz
xevz / gist:344407
Created March 26, 2010 02:27
MPlayer wrapper script for VDPAU
#!/bin/sh
# Video filters: dsize=1280:1024:0,scale=0:0,expand=::::1:1280/1024:,harddup
MPLAYER=$HOME/bin/mplayer-bin
CLEAR_FILTERS='-vf-del 0,1,2,3'
ARGUMENTS=
FILE=
for arg in "$*"; do
@xevz
xevz / zsh_map_function.sh
Created January 19, 2010 01:29
map function for zsh
# From http://www.reddit.com/r/linux/comments/akt3j/a_functional_programming_style_map_function_for/
# Modified to work in zsh.
function map() {
local command i rep
if [ $# -lt 2 ] || [[ ! "$@" =~ :[[:space:]] ]];then
echo "Invalid syntax." >&2; return 1
fi
until [[ $1 =~ : ]]; do
command="$command $1"; shift
done