diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/mount-a | 9 | ||||
-rw-r--r-- | src/bin/mount-b | 9 | ||||
-rw-r--r-- | src/bin/mount-c | 9 | ||||
-rw-r--r-- | src/bin/mount-c1 | 4 | ||||
-rw-r--r-- | src/bin/umount-a | 4 | ||||
-rw-r--r-- | src/bin/umount-b | 4 | ||||
-rw-r--r-- | src/bin/umount-c | 3 | ||||
-rw-r--r-- | src/git/_gitconfig | 9 | ||||
-rw-r--r-- | src/ssh/config | 4 | ||||
-rw-r--r-- | src/sudo/etc-sudoers.txt | 13 | ||||
-rw-r--r-- | src/xorg/_xinitrc | 3 |
11 files changed, 34 insertions, 37 deletions
diff --git a/src/bin/mount-a b/src/bin/mount-a deleted file mode 100644 index 72bc6cc..0000000 --- a/src/bin/mount-a +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [[ $# -lt 1 ]] ; then - echo -e "usage:\t$(basename $0) deviceToMount" -else - echo sudo mount -o gid=`id -g`,uid=`id -u` $1 /mnt/a/ - sudo mount -o gid=`id -g`,uid=`id -u` $1 /mnt/a/ -fi - diff --git a/src/bin/mount-b b/src/bin/mount-b deleted file mode 100644 index 91108f1..0000000 --- a/src/bin/mount-b +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [[ $# -lt 1 ]] ; then - echo -e "usage:\t$(basename $0) deviceToMount" -else - echo sudo mount -o gid=`id -g`,uid=`id -u` $1 /mnt/b/ - sudo mount -o gid=`id -g`,uid=`id -u` $1 /mnt/b/ -fi - diff --git a/src/bin/mount-c b/src/bin/mount-c deleted file mode 100644 index 7b76e5f..0000000 --- a/src/bin/mount-c +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [[ $# -lt 1 ]] ; then - echo -e "usage:\t$(basename $0) deviceToMount" -else - echo sudo mount -o gid=`id -g`,uid=`id -u` $1 /mnt/c/ - sudo mount -o gid=`id -g`,uid=`id -u` $1 /mnt/c/ -fi - diff --git a/src/bin/mount-c1 b/src/bin/mount-c1 new file mode 100644 index 0000000..45da8c3 --- /dev/null +++ b/src/bin/mount-c1 @@ -0,0 +1,4 @@ +#!/bin/sh + +echo mount -o uid=`id -u`,gid=`id -g`,noatime,noexec /dev/sdc1 /mnt/c/ +sudo mount -o uid=`id -u`,gid=`id -g`,noatime,noexec /dev/sdc1 /mnt/c/ diff --git a/src/bin/umount-a b/src/bin/umount-a deleted file mode 100644 index 16b8dc6..0000000 --- a/src/bin/umount-a +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -sudo umount /mnt/a - diff --git a/src/bin/umount-b b/src/bin/umount-b deleted file mode 100644 index a4c8113..0000000 --- a/src/bin/umount-b +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -sudo umount /mnt/b - diff --git a/src/bin/umount-c b/src/bin/umount-c index 3ea510e..54647dc 100644 --- a/src/bin/umount-c +++ b/src/bin/umount-c @@ -1,4 +1,3 @@ -#!/bin/bash +#!/bin/sh sudo umount /mnt/c - diff --git a/src/git/_gitconfig b/src/git/_gitconfig index b2dcb56..83cf455 100644 --- a/src/git/_gitconfig +++ b/src/git/_gitconfig @@ -49,3 +49,12 @@ #[core] # pager = less -R -+X +# How to push to multiple remotes in one go: +# git push all --dry-run --all +# [remote "all"] +# pushurl = user@ONE.example.com:foo/bar.git +# pushurl = user@TWO.example.com:foo/bar.git + +# How to fetch from multiple remotes (but NOT all!) in one go: +# git fetch --multiple origin upstream + diff --git a/src/ssh/config b/src/ssh/config index d5cebfc..159d1f9 100644 --- a/src/ssh/config +++ b/src/ssh/config @@ -26,6 +26,10 @@ Host 192.168.56.* StrictHostKeyChecking no UserKnownHostsFile /dev/null +# Forward X11 by default +Host example.com + ForwardX11 yes + # Run few setup cmds before starting a shell. Host example.com RequestTTY yes diff --git a/src/sudo/etc-sudoers.txt b/src/sudo/etc-sudoers.txt new file mode 100644 index 0000000..ab69ea5 --- /dev/null +++ b/src/sudo/etc-sudoers.txt @@ -0,0 +1,13 @@ + +Cmnd_Alias CMD_POWEROFF = /sbin/poweroff "" +Cmnd_Alias CMD_MOUNT_C1 = /usr/bin/mount -o "uid=1000\,gid=1000,noatime,noexec" /dev/sdc1 /mnt/[abcdefghijklmnopqrstuvwxyz] + +# MUST be BELOW the "%sudo" line !!!!!!!! +alice ALL=(root) NOPASSWD: CMD_POWEROFF +alice ALL=(root) NOPASSWD: CMD_MOUNT_C1 + + +## Links + +# Syntax "https://unix.stackexchange.com/a/18880/292722" + diff --git a/src/xorg/_xinitrc b/src/xorg/_xinitrc index e0ff5de..841baea 100644 --- a/src/xorg/_xinitrc +++ b/src/xorg/_xinitrc @@ -7,5 +7,8 @@ xset s off # screensaver xset -dpms # disable DPMS (Energy Star) features xset s noblank # don't blank the video device +# Or as a CopyPasta oneliner: +# xset s off && xset -dpms && xset s noblank + exec /etc/alternatives/x-session-manager |