Skip to content

Instantly share code, notes, and snippets.

@alejor
alejor / sync
Created December 5, 2014 21:44
Comandos Sincronización Laptop <-> Disco Externo
Sync home:
rsync -aAXv /home/neko/. /run/media/neko/72E182764E76FD92/
Sync Archlinux:
rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/*","/boot/*","/etc/fstab"} /* /run/media/neko/archlinux/ && cp -v /boot/* /run/media/neko/archlinux/boot/
@alejor
alejor / [email protected]
Created November 3, 2017 22:19
Remote Tunnel Systemd Unit
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
[Service]
User=root
EnvironmentFile=/etc/default/secure-tunnel@%i
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${SSH_PORT} -R ${REMOTE_PORT}:localhost:${LOCAL_PORT} ${TARGET}
# Restart every >2 seconds to avoid StartLimitInterval failure
@alejor
alejor / inetest.sh
Last active November 9, 2019 00:08
call with rainbow https://github.com/nicoulaj/rainbow , i.e. rainbow --red-before 'ERROR:.*' --green-before 'OK:.*' bash inetest.sh
#!/usr/bin/env bash
FLIP=0
TS1=`date +%s`
TS2=`date +%s`
while true
do
ping 8.8.8.8 -q -c 1 -w 10 &> /dev/null
STATE=$?
if [[ $STATE -eq 0 ]]
@alejor
alejor / gist:aa714ae995b4d76e5c9ed027fb152ecc
Last active March 30, 2020 17:16
alejor_sway_coredump
neko@ciel ~ % coredumpctl debug
PID: 6842 (sway)
UID: 1000 (neko)
GID: 1000 (neko)
Signal: 11 (SEGV)
Timestamp: Mon 2020-03-30 11:06:13 -05 (1h 3min ago)
Command Line: sway
Executable: /usr/bin/sway
Control Group: /user.slice/user-1000.slice/session-3.scope
Unit: session-3.scope