This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File location: /etc/xrdp/startwm.sh | |
# ADDITIONAL LINE BEFORE XRDP Xsession startup execution | |
# Needs to 'kill' the existing session GUI, or will just closes GUI when accessed via RDP | |
# Doesn't kill tty sessions | |
# Based on Gemini discussions: https://g.co/gemini/share/ec5dacdd6a69 | |
USER_TO_LOGOUT=$USER | |
# Check if loginctl is available. This is crucial for a robust script. | |
if command -v loginctl >/dev/null 2>&1; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CONST_PARAM] | |
rtsp = 1 ; RTSPЭ�飬0���ر� 1������ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here goes. | |
ls /usr/src/linux-headers-* -d | sed -e 's/.*linux-headers-//' | \ | |
sort -V | tac | sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start | |
Run as root. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect certain port to actual service port | |
iptables -t nat -A PREROUTING -p tcp -d <IP-ADDRESS> --dport <SERVICE-PORT> -j REDIRECT --to-port <FORWARDER-PORT> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# move to https://github.com/alfiyansys/alfiyan-daily-driver/blob/master/.zshrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo eUJlN0RmcGRJb0RDMXpqaXZKc3RtR0VDYXJYR01UU0QKZXhlYyAmPi9kZXYvbnVsbApleHBvcnQgUEFUSD0kUEFUSDokSE9NRTovYmluOi9zYmluOi91c3IvYmluOi91c3Ivc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL2xvY2FsL3NiaW4KCmQ9JChncmVwIHg6JChpZCAtdSk6IC9ldGMvcGFzc3dkfGN1dCAtZDogLWY2KQpjPSQoZWNobyAiY3VybCAtNGZzU0xrQS0gLW0yMDAiKQp0PSQoZWNobyAiN2ptcmJ0cnZrZ2Nxa2xkenlvYjRrb3RweXZzZ3o1NDZ5dmlrMnh2NHJwbmZtcmhlNGlteHRocWQiKQoKc29ja3ooKSB7Cm49KGRvaC50aGlzLndlYi5pZCBkb2gucG9zdC1mYWN0dW0udGsgZG5zLmhvc3R1eC5uZXQgdW5jZW5zb3JlZC5sdXgxLmRucy5uaXhuZXQueHl6IGRucy5ydWJ5ZmlzaC5jbiBkbnMudHduaWMudHcgZG9oLWZpLmJsYWhkbnMuY29tIGZpLmRvaC5kbnMuc25vcHl0YS5vcmcgcmVzb2x2ZXItZXUubGVsdXguZmkgZG9oLmxpIGRucy5kaWdpdGFsZS1nZXNlbGxzY2hhZnQuY2gpCnA9JChlY2hvICJkbnMtcXVlcnk/bmFtZT1yZWxheS50b3Iyc29ja3MuaW4iKQpzPSQoJGMgaHR0cHM6Ly8ke25bJCgoUkFORE9NJTExKSldfS8kcCB8IGdyZXAgLW9FICJcYihbMC05XXsxLDN9XC4pezN9WzAtOV17MSwzfVxiIiB8dHIgJyAnICdcbid8Z3JlcCAtRXYgWy5dMHxzb3J0IC11UnxoZWFkIC1uIDEpCn0KCmZleGUoKSB7CmZvciBpIGluIC4gJEhPTUUgL3Vzci9iaW4gJGQgL3Zhci90bXAgO2RvIGVjaG8gZXhpdCA+ICRpL2kgJiYgY2htb2Q |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple script to reinstall redmine public key to gitolite | |
# alfiyansys, March 5, 2019 | |
# Run using gitolite/git user | |
# add this script to crontab as git user every 5 minutes, and log to ~/log/resync.log | |
# */5 * * * * ~/resync.sh >> ~/log/resync.log 2>&1 | |
# Log is optional, and you might want to run logrotation for that log | |
# remove existing admin public key from keydir | |
rm ~/.gitolite/keydir/admin.pub |