├── Additional_Badass_Software.txt ├── Additional_Terminal_Packages.txt ├── Additional_rather_useful_software.txt ├── Additional_sweetass_software.txt ├── Agent.txt ├── Aliases.txt ├── Alpha_AWUS036H.txt ├── Arch_Base.txt ├── Automount_USB_and_HDD.txt ├── Backlight.txt ├── Basic_Tools_and_General_Examples.txt ├── Bluez.txt ├── Buku.txt ├── CPU.txt ├── Clean_the_Filesystem.txt ├── Cmus.txt ├── Cower.txt ├── Cron.txt ├── DKMS.txt ├── DPMS.txt ├── Desktop_Entries.txt ├── Disable_Watchdog.txt ├── Display_Driver.txt ├── Downgrading.txt ├── Dunst.txt ├── Fail2ban.txt ├── Feh.txt ├── Firefox.txt ├── Fn-key.txt ├── Fonts.txt ├── Functions.txt ├── GPG.txt ├── Gimp.txt ├── Git.txt ├── Gnu_Screen.txt ├── Hardware.txt ├── Haxor-news.txt ├── Home.txt ├── KeePass.txt ├── Kernel_Modules.txt ├── Kernels.txt ├── Keys.txt ├── LAMP.txt ├── LICENSE ├── Laptop.txt ├── LibreOffice.txt ├── Login.txt ├── Mimeo.txt ├── Mirrors.txt ├── MonoDevelopment.txt ├── Network.txt ├── PSD_and_ASD.txt ├── Pacman.txt ├── Pacnew_and_Pacsave.txt ├── Permissions.txt ├── Pulseaudio.txt ├── README.md ├── Ranger.txt ├── Ranger_mapping.txt ├── Reddit_Terminal_Viewer.txt ├── SASS.txt ├── SSD.txt ├── SSMTP.txt ├── Server_and_Client.txt ├── Software.txt ├── Steam.txt ├── Sublime.txt ├── Sublime_mapping.txt ├── Systemd.txt ├── Terminal.txt ├── Terminal_Keks.txt ├── Theming.txt ├── Tor.txt ├── Touchpad.txt ├── Users_and_Groups.txt ├── VA-API_and_VDPAU.txt ├── Vim.txt ├── VirtualBox.txt ├── Wasteland_2.txt ├── Windows.txt ├── Xbindkeys.txt ├── Xorg.txt ├── Xresources.txt ├── Yaourt.txt ├── Zsh.txt ├── aircrack-ng.txt ├── clamav.txt ├── i3.txt ├── i3_mapping.txt ├── ipset.txt ├── iptable_rules.txt ├── iptables.txt ├── irssi.txt ├── journalctl.txt ├── ls.txt ├── lynis.txt ├── makepkg.txt ├── monero.txt ├── mplayer.txt ├── netctl.txt ├── nmap.txt ├── notebook.zim ├── rxvt-unicode.txt ├── scp.txt ├── screenshot_play.png ├── sed.txt ├── sudo.txt ├── vim_mapping.txt └── wireshark.txt /Additional_Badass_Software.txt: -------------------------------------------------------------------------------- 1 | ====== Additional Badass Software ====== 2 | Created søndag 04 december 2016 3 | 4 | **# A list of some nice additions** 5 | 6 | == Record My Desktop == 7 | **# **//gtk-recordmydesktop//** allows you to record videos of your desktop** 8 | $ pacman -S gtk-recordmydesktop 9 | 10 | **# Later versions seems to flicker quite a lot - try recording with the following;** 11 | $ recordmydesktop --use-jack system:capture_1 --v_bitrate 2000000 12 | 13 | 14 | == PDF Reader == 15 | **# **//MuPDF//** is a pretty simple/sweet reader** 16 | $ pacman -S mupdf 17 | 18 | **# Launched from the terminal** 19 | $ mupdf ///path/to/pdf// 20 | 21 | **# Passwords, append **//-d// 22 | $ mupdf -d //// ///path/to/pdf// 23 | 24 | **# Start page 225 (etc)** 25 | $ mupdf -p 225 ///path/to/pdf// 26 | 27 | **# Binds;** 28 | **# **//Ctrl+Scroll//** to zoom** 29 | **# **/** = (slash) to start a search** 30 | **# **//n//** = find next place for searched word** 31 | **# **//N//** = find previous place for searched word** 32 | **# **//[ ]//** = rotate clock/counter-clockwise ** 33 | **# **//< > //**=** **jump ten pages back/forth** 34 | **# **//i//** = display document metadata** 35 | **# **//m//** = save current page to bookmark** 36 | **# **//t//** = go back in bookmarks** 37 | **# **//T//** = go forward in bookmarks** 38 | 39 | 40 | == Zim Desktop Wiki == 41 | **# Amazing for keeping notes** 42 | $ pacman -S zim 43 | 44 | **# You can add additional plugins from the **//Edit > Preferences//** option.** 45 | **# Noticeable might be **//Source View, Table Editor //**and **//Spell Checker// 46 | 47 | **# **//Source View//**, which can display code snippets in the wiki, requires this package** 48 | $ pacman -S pygtksourceview2 49 | 50 | **# **//Spell Checker//** needs these packages from the official repository** 51 | $ pacman -S gtkspell python2-gtkspell aspell-en 52 | 53 | **# And the Danish language package from the AUR** 54 | $ yaourt -S aspell-da 55 | 56 | 57 | == Dropbox == 58 | $ yaourt -S dropbox 59 | 60 | **# and enable the service on a user level** 61 | $ systemctl --user enable dropbox.service 62 | 63 | **# To login to your dropbox account, run **//dropbox//** from your terminal/dmenu - whatevs. ** 64 | 65 | **# To have the Dropbox icon in the statusbar, edit the service file (empty)** 66 | $ systemctl --user edit dropbox 67 | 68 | **# Add these lines** 69 | {{{code: lang="texinfo" linenumbers="True" 70 | [Service] 71 | Environment=DISPLAY=:0 72 | }}} 73 | 74 | 75 | 76 | == Notebook == 77 | **# With #hashtags, search, calendar etc etc. ** 78 | $ yaourt -S rednotebook 79 | 80 | 81 | == E-book Converter == 82 | **# Convert E-books to **//.mobi//** format for, Kindle devices, with **//Calibre// 83 | $ pacman -S calibre 84 | 85 | **# Convert with their included script, **//ebook-converter // 86 | **# Note that you give the path to the E-book in question (**//.epub//** ex), then give it what suffix it should convert to (**//.mobi//**)** 87 | $ ebook-convert /path/to/.epub .mobi 88 | 89 | -------------------------------------------------------------------------------- /Additional_Terminal_Packages.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-22T01:28:45+01:00 4 | 5 | ====== Additional Terminal Packages ====== 6 | Created torsdag 22 december 2016 7 | 8 | **Will try and collect a list of nice additions to the terminal** 9 | 10 | == System info and distro logo in terminal == 11 | **# **//neofetch//** will output systeminfo along with a distro logo in the terminal** 12 | $ yaourt -S neofetch 13 | 14 | == Analog clock in tty/terminal == 15 | **# Use with **//clockywock// 16 | $ yaourt -S clockywock 17 | 18 | == Steam Locomotive across terminal == 19 | **# Did you mean **//ls?//** Aw well, use with **//sl// 20 | $ pacman -S sl 21 | 22 | == Large ASCII letters == 23 | **# **//figlet//** will transform your text to big ASCII characters** 24 | $ pacman -S figlet 25 | 26 | == Asciiquarium == 27 | **# An aquarium ASCII animation in the Terminal** 28 | $ pacman -S asciiquarium 29 | 30 | == Hide mouse cursor on inactivity == 31 | **# This might be a little out of category - ** 32 | **#** **but have you ever found yourself annoyed 'bout the mouse when typing/interacting with the terminal?** 33 | **# I have.. Install **//unclutter//** to hide the mouse when it hasn't been operated for a while** 34 | $ yaourt -S unclutter-xfixes-git 35 | 36 | == TODO manager == 37 | **# **//Task//** is a nice little todo manager** 38 | $ pacman -S task 39 | 40 | **# To add a task** 41 | $ task add //Buy Milk// 42 | 43 | **# To list all tasks** 44 | $ task list 45 | 46 | **# To mark a task done, ex **//Task 1// 47 | $ task 1 done 48 | -------------------------------------------------------------------------------- /Additional_rather_useful_software.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-12T08:22:03+01:00 4 | 5 | ====== Additional rather useful software ====== 6 | Created Thursday 12 January 2017 7 | 8 | == Clipboard == 9 | **# **//Xclip//** is a lightweight clipboard manager** 10 | $ pacman -S xclip 11 | 12 | **# You can pipe content to the Clipboard, ex ** 13 | $ uptime | xclip 14 | 15 | -------------------------------------------------------------------------------- /Additional_sweetass_software.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-19T06:29:29+01:00 4 | 5 | ====== Additional sweetass software ====== 6 | Created mandag 19 december 2016 7 | 8 | **A list of candy to the eyes. ** 9 | 10 | == Compton == 11 | **# A composite manager for transparency and shadows.** 12 | **# Compton seems to be the best patched package.** 13 | $ pacman -S compton 14 | 15 | **# Start the application in **xinitrc** and use your dotfile configuration (Github)** 16 | compton -b --config ~/.compton.conf 17 | 18 | 19 | == Redshift == 20 | **# Dim the screen (well the gamma actually) depending on time of day.** 21 | **# Configuration files is read from **//~/.config/redshift.conf //**(Github)** 22 | **# Get locations (lon/lat) here : **http://www.latlong.net/ 23 | $ yaourt -S redshift-minimal 24 | 25 | **# Enable the service (no sudo!)** 26 | $ systemctl --user enable redshift.service 27 | 28 | -------------------------------------------------------------------------------- /Agent.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-11-23T12:13:50+01:00 4 | 5 | ====== Agent ====== 6 | Created onsdag 23 november 2016 7 | 8 | **An SSH agent will cache your private-key, so it can be provided to other SSH clients (Git etc). ** 9 | //ssh-agent//** is the default agent included with OpenSSH.** 10 | 11 | **# Zsh!** 12 | **# There is a plugin in OMZ, that allows you to easily run a SSH-agent at startup. See **Zsh**.** 13 | 14 | ===== Bash ===== 15 | **# Below is Bash specific - Zsh has a SSH agent plugin (or is it Oh-My-Zsh? Who cares)** 16 | 17 | == Run the agent == 18 | $ eval $(ssh-agent) 19 | 20 | == Add private key to agent == 21 | $ ssh-add ~/.ssh///// 22 | 23 | == To start the agent automatically == 24 | **# Add the following to your **//~/.bashrc//** file. ** 25 | **#** **This will also make sure, that only one instance of ssh-agent is running.** 26 | {{{code: lang="texinfo" linenumbers="True" 27 | if ! pgrep -u $USER ssh-agent > /dev/null; then 28 | ssh-agent > ~/.ssh-agent 29 | fi 30 | if "$SSH_AGENT_PID" == "" ; then 31 | eval $(<~/.ssh-agent) 32 | fi 33 | }}} 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Aliases.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T01:57:52+02:00 4 | 5 | ====== Aliases (.bashrc) ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | **Add to your** //~/.bashrc/.zshrc// **file for permanent settings.** 9 | 10 | == ls == 11 | {{{code: lang="texinfo" linenumbers="True" 12 | alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' 13 | alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' 14 | alias ll='ls -ll --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' 15 | }}} 16 | 17 | 18 | == cp == 19 | {{{code: lang="texinfo" linenumbers="True" 20 | # confirm before overwrite (verbose) 21 | alias cp="cp -iv" 22 | }}} 23 | 24 | 25 | == mkdir == 26 | {{{code: lang="texinfo" linenumbers="True" 27 | # create parent folders too 28 | alias mkdir="mkdir -pv" 29 | }}} 30 | 31 | 32 | == cd == 33 | {{{code: lang="texinfo" linenumbers="True" 34 | # even when you forget the space 35 | alias cd..="cd .." 36 | }}} 37 | 38 | 39 | == grep == 40 | {{{code: lang="texinfo" linenumbers="True" 41 | # Colorful grep 42 | alias grep='grep --color=tty -d skip' 43 | }}} 44 | 45 | 46 | == df == 47 | {{{code: lang="texinfo" linenumbers="True" 48 | # human readable size and a total amount 49 | alias df="df -Tha --total" 50 | }}} 51 | 52 | 53 | == free == 54 | {{{code: lang="texinfo" linenumbers="True" 55 | # human readable size 56 | alias free="free -mt" 57 | }}} 58 | 59 | 60 | == top == 61 | {{{code: lang="texinfo" linenumbers="True" 62 | # requires htop packages (better top view) 63 | alias top="htop" 64 | }}} 65 | 66 | 67 | == wget == 68 | {{{code: lang="texinfo" linenumbers="True" 69 | # enables you to resume a download if something went wrong 70 | alias wget="wget -c" 71 | }}} 72 | 73 | 74 | == File Utilities == 75 | **# Mother of aliases! Makes the typical fileutils more verbose** 76 | {{{code: lang="texinfo" linenumbers="True" 77 | for c in cp rm chmod chown rename; do 78 | alias $c="$c -v" 79 | done 80 | }}} 81 | 82 | 83 | ===== List of Keks ===== 84 | **# Because why not?** 85 | {{{code: lang="texinfo" linenumbers="True" 86 | # Logs 87 | alias wtf='dmesg' 88 | 89 | 90 | # mkdir, rm, cp and mv 91 | alias icanhas='mkdir' 92 | alias donotwant='rm' 93 | alias dowant='cp' 94 | alias gtfo='mv' 95 | 96 | # cd and pwd 97 | alias hai='cd' 98 | alias plz='pwd' 99 | 100 | # killall 101 | alias nomnom='killall' 102 | 103 | # reboot and shutdown 104 | alias cya='reboot' 105 | alias kkthxbye='halt' 106 | }}} 107 | 108 | 109 | -------------------------------------------------------------------------------- /Alpha_AWUS036H.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-25T03:28:23+01:00 4 | 5 | ====== Alpha AWUS036H ====== 6 | Created Saturday 25 February 2017 7 | 8 | **The Alpha AWUS036H, using the RTL8187L chipset, works out the box - but we are gonna tweak it a little for our needs.** 9 | 10 | == Starting the Device == 11 | **# The device dosen't power up itself once plugged in. Power it up with** 12 | **# Get the device name with** 13 | $ iwconfig 14 | **# OR** 15 | $ ip link 16 | 17 | **# In my example the card was named **//wlp0s20u2// 18 | $ ip link set wlp0s20u2 up 19 | 20 | == Driver == 21 | **# We'll need a patched version of the driver** 22 | $ yaourt -S backports-patches-git 23 | 24 | == Promiscuous Mode == 25 | **# To have our monitors catch all packages, we'll need to put it in promiscuous mode** 26 | **# Create a file in **///etc/systemd/system/promiscuous@.service //**with the following** 27 | {{{code: lang="texinfo" linenumbers="True" 28 | [Unit] 29 | Description=Set %i interface in promiscuous mode 30 | After=network.target 31 | 32 | [Service] 33 | Type=oneshot 34 | ExecStart=/usr/bin/ip link set dev %i promisc on 35 | RemainAfterExit=yes 36 | 37 | [Install] 38 | WantedBy=multi-user.target 39 | }}} 40 | 41 | 42 | **# Then you can Enable/Start Promiscuous Mode for a specific card (Change accordingly)** 43 | $ systemctl start promiscuous@wlp0s20u3.service 44 | -------------------------------------------------------------------------------- /Arch_Base.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T03:41:50+02:00 4 | 5 | ====== Arch Base ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **This will be a simple step-by-step guide. With an unserious attempt to put the process into categories,** 9 | 10 | **# Editor** 11 | $ nano 12 | 13 | == Create the bootable USB == 14 | **#** **Download your favorite Arch distro^ You can use dd to create the bootable USB** 15 | $ dd if=/path/to/arch_image.iso of=/dev/sdX bs=4M && sync 16 | 17 | == Boot == 18 | **# Boot the USB as UEFI** 19 | 20 | == Pre-installation == 21 | **#** **Set the keyboard layout ** 22 | $ loadkeys dk-latin1 23 | 24 | **#** **Connect to the internet ** 25 | $ wifi-menu 26 | 27 | **#** **Update the system clock ** 28 | $ timedatectl set-ntp true 29 | 30 | == Prepare the disk == 31 | **#** **Partition the disk : ** 32 | **#** **Use the gdisk package (for GPT disks). Consult with **?** for commands.** 33 | **# Once you start gdisk it'll ask for device. Provide it with your disk** ///dev/sda// 34 | **#** **Create 4 partitions.** 35 | **EFI **EFI bootable 36 | **/ **Linux Filesystem 37 | **/home **Your home for local files 38 | **swap **Your additional memory space 39 | 40 | 41 | == Format the partitions == 42 | # **Get partition information with** 43 | $ lsblk -f 44 | 45 | # **EFI** **partition** 46 | $ mkfs.vfat /dev/sdaX 47 | 48 | # **Linux Filesystem** 49 | $ mkfs.ext4 /dev/sdaX 50 | 51 | # **Home partition** 52 | $ mkfs.ext4 /dev/sdaX 53 | 54 | # **Swap partition** 55 | $ mkswap /dev/sdaX 56 | 57 | == Mount the partitions == 58 | **# First initialize the **//swap//** partition** 59 | $ swapon /dev/sdaX 60 | 61 | **# Then mount your **//Linux Filesystem// 62 | $ mount /dev/sdaX /mnt 63 | 64 | **# Create mount-point (folders) for the remaining partitions** 65 | $ mkdir /mnt/boot 66 | $ mkdir /mnt/home 67 | 68 | **# And mount the remaining partitions ** 69 | $ mount /dev/sdaX /mnt/boot **#** The **EFI** boorable partition 70 | $ mount /dev/sdaX /mnt/home **#** The **Home** partition 71 | 72 | == Installation == 73 | **# You can Edit **///etc/pacman.d/mirrorlist//** and move preferred mirrors to the top, if you like.** 74 | 75 | **#** **Install the Arch Base ** 76 | $ pacstrap /mnt base 77 | 78 | == Post installation == 79 | **#** **Generate the fstab file ** 80 | $ genfstab -U /mnt >> /mnt/etc/fstab 81 | 82 | **#** **Change root into the newly installed system ** 83 | $ arch-chroot /mnt 84 | 85 | **#** **Set the time zone ** 86 | **# This will generate **///etc/adjtime// 87 | $ ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime 88 | $ hwclock --systohc 89 | 90 | **#** **Locale ** 91 | **#** **Edit** /etc/locale.gen **and uncomment BOTH** //en_US.UFT-8 //**and**// da_DK.UTF-8// 92 | {{{code: lang="texinfo" linenumbers="True" 93 | da_DK.UTF-8 UTF-8 94 | en_US.UTF-8 UTF-8 95 | }}} 96 | 97 | 98 | **# And generate locale** 99 | $ locale-gen 100 | 101 | **# Set the LANG variable in** /etc/locale.conf 102 | {{{code: lang="texinfo" linenumbers="True" 103 | LANG=en_US.UTF-8 104 | }}} 105 | 106 | 107 | **# Make the keyboard layout persistent in** tty **within** /etc/vconsole.conf 108 | {{{code: lang="texinfo" linenumbers="True" 109 | KEYMAP=dk-latin1 110 | }}} 111 | 112 | 113 | **# Create a desired hostname in** /etc/hostname 114 | {{{code: lang="texinfo" linenumbers="True" 115 | dinnabo 116 | }}} 117 | 118 | 119 | **# And add the entry to** /etc/hosts 120 | {{{code: lang="texinfo" linenumbers="True" 121 | 127.0.0.1 localhost.localdomain localhost 122 | ::1 localhost.localdomain localhost 123 | 127.0.1.1 dinnabo.localdomain dinnabo 124 | }}} 125 | 126 | 127 | **#** **Network tools** 128 | $ pacman -S iw wpa_supplicant dialog 129 | 130 | **#** **Remember to install the **//base-devel//** as well ** 131 | $ pacman -S base-devel 132 | 133 | **#** **Set the root password ** 134 | $ passwd 135 | 136 | == Boot Loader == 137 | **# Grub will be used for this example.** 138 | 139 | **# Install the **//grub, Intel-ucode //**and **//efibootmgr//** packages. ** 140 | **#** **If dual-booting, also install the **//os-prober//** package. ** 141 | **# Intel Microcode (**//ucode//**) provides system stability and is detected automatically by **//mkconfig//**.** 142 | **# **//efibootmgr//** is needed for our EFI system.** 143 | $ pacman -S grub intel-ucode efibootmgr 144 | 145 | **# If dual-booting, also install this package** 146 | $ pacman -S os-prober 147 | 148 | **#** **Install to **///boot//** partition ** 149 | $ grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub 150 | 151 | **#** **Generate configuration file ** 152 | $ grub-mkconfig -o /boot/grub/grub.cfg 153 | 154 | == Reboot == 155 | **# Exit the chroot environment and Unmount the partitions** 156 | $ exit 157 | $ umount -R /mnt 158 | $ reboot 159 | 160 | -------------------------------------------------------------------------------- /Automount_USB_and_HDD.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-31T03:38:27+01:00 4 | 5 | ====== Automount USB and HDD ====== 6 | Created Saturday 31 December 2016 7 | 8 | **We'll need **//Udisk2//** to read/write to our external devices and **//Udevil//** to automatic mount the devices when plugged in. We'll also add some extra partition scheme support - **//fat//** and **//ntfs//** to be specific. ** 9 | 10 | == Usage == 11 | **# Once the installation steps below has been completed, devices should mount automatic. ** 12 | **# Devices will be mounted at **///media//// 13 | 14 | **# You need to manual unmount the device once you're done (always do this before unplugging)** 15 | $ udevil unmount /media////////// 16 | 17 | == Installation == 18 | **# For **//ntfs //**and **//fat//** support ** 19 | $ pacman -S ntfs-3g dosfstools 20 | 21 | **# For mount/auto-mount ** 22 | $ pacman -S udisks2 udevil 23 | 24 | **# Remove the SUID permission from **//Udevil //**(with sudo)** 25 | $ chmod u+s,go-s,ugo+x /usr/bin/udevil 26 | 27 | **# Enable the service file, taking the **//username//** as an argument ** 28 | $ systemctl enable devmon@////.service 29 | 30 | **# Create a file in **///etc/polkit-1/rules.d/50-udevil.rules// 31 | {{{code: lang="texinfo" linenumbers="True" 32 | polkit.addRule(function(action, subject) { 33 | var YES = polkit.Result.YES; 34 | // NOTE: there must be a comma at the end of each line except for the last: 35 | var permission = { 36 | // required for udisks1: 37 | "org.freedesktop.udisks.filesystem-mount": YES, 38 | "org.freedesktop.udisks.luks-unlock": YES, 39 | "org.freedesktop.udisks.drive-eject": YES, 40 | "org.freedesktop.udisks.drive-detach": YES, 41 | // required for udisks2: 42 | "org.freedesktop.udisks2.filesystem-mount": YES, 43 | "org.freedesktop.udisks2.encrypted-unlock": YES, 44 | "org.freedesktop.udisks2.eject-media": YES, 45 | "org.freedesktop.udisks2.power-off-drive": YES, 46 | // required for udisks2 if using udiskie from another seat (e.g. systemd): 47 | "org.freedesktop.udisks2.filesystem-mount-other-seat": YES, 48 | "org.freedesktop.udisks2.filesystem-unmount-others": YES, 49 | "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES, 50 | "org.freedesktop.udisks2.eject-media-other-seat": YES, 51 | "org.freedesktop.udisks2.power-off-drive-other-seat": YES 52 | }; 53 | if (subject.isInGroup("storage")) { 54 | return permission[action.id]; 55 | } 56 | }); 57 | }}} 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Backlight.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-23T13:00:47+01:00 4 | 5 | ====== Backlight ====== 6 | Created Thursday 23 February 2017 7 | 8 | **Xbacklight should already be installed - it is part of the **//xorg-server-utils//** package. Xbacklight does not remember the brightness over boots though, so we will fix that with a different package that uses ACPI controls instead - which is something systemd can remember across boots. We'll also install a package to dim the brightness on inactivity - not turning of the display, just dimming it. ** 9 | 10 | == Acpilight == 11 | **# Acpilight will make sure Xbacklight uses ACPI instead** 12 | **# The **//xbacklight//** command stays - it is just an extended functionality** 13 | $ yaourt -S acpilight 14 | 15 | **# Put your user in the **//Video//** group** 16 | $ gpasswd --add stick video 17 | 18 | **# And create a file in **///etc/udev/rules.d/90-backlight.rules//** with the following ** 19 | {{{code: lang="texinfo" linenumbers="True" 20 | SUBSYSTEM=="backlight", ACTION=="add", \ 21 | RUN+="/bin/chgrp video %S%p/brightness", \ 22 | RUN+="/bin/chmod g+w %S%p/brightness" 23 | }}} 24 | 25 | 26 | **# Effects will take place after the next reboot. ** 27 | 28 | -------------------------------------------------------------------------------- /Basic_Tools_and_General_Examples.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T15:25:38+02:00 4 | 5 | ====== Basic Tools and General Examples ====== 6 | Created lørdag 22 Oktober 2016 7 | 8 | == locate == 9 | **# Search the filesystem with **//locate// 10 | $ pacman -S mlocate 11 | 12 | **# locate depends on a database to perform its searches. ** 13 | **# Create this database ** 14 | $ //updatedb// 15 | 16 | **# The database is updated daily, but you can at any time update it manually with above command.** 17 | **# Now you can use** //locate filename/folder //**to find files and folders on the system.** 18 | 19 | == htop == 20 | **#** **For a more detailed top command (process viewer)** 21 | $ pacman -S htop 22 | 23 | **# Invoke with ** 24 | $ htop 25 | 26 | == Create a bootable USB with dd == 27 | $ dd bs=4M if=/path/to/image of=/dev/sdX && sync 28 | 29 | == Symlinks == 30 | **# Use absolute paths! Etc **///home//folder/file// 31 | $ ln -s // // 32 | 33 | **# To remove a symlink** 34 | $ unlink //// 35 | 36 | == Tail == 37 | **# To see the last 10 lines of a file** 38 | $ tail //// 39 | 40 | **# You can also follow/ track new content (logs etc) ** 41 | $ tail -f //// 42 | 43 | == Network == 44 | **# Download file** 45 | $ wget //// 46 | 47 | **# Recursive download files** 48 | $ wget -r //// 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Bluez.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-28T19:57:34+01:00 4 | 5 | ====== Bluez ====== 6 | Created onsdag 28 december 2016 7 | 8 | == Installation == 9 | **# Install the following packages** 10 | $ pacman -S bluez bluez-utils 11 | 12 | **# Modprobe the bluetooth driver** 13 | $ modprobe btusb 14 | 15 | **# Then start the bluetooth service whenever needed** 16 | $ systemctl start bluetooth.service 17 | 18 | ===== Usage ===== 19 | **# Open the bluetooth interactive shell** 20 | $ bluetoothctl 21 | 22 | **# You can always run **//help//** in this shell, to list all commands^** 23 | 24 | **# Power on the controller (off by default)** 25 | $ power on 26 | 27 | **# If the device is NOT already on your list, begin a scan** 28 | $ scan on 29 | 30 | **# To get a list of all your **registered** devices** 31 | $ devices 32 | 33 | **# Once you've found your device, pair it (You can **////** complete)** 34 | $ pair //// 35 | 36 | **# If using a device without a PIN, trust the device to be able to reconnect** 37 | $ trust //// 38 | 39 | **# Then connect to the device** 40 | $ connect //// 41 | 42 | 43 | ===== Troubleshoot ===== 44 | **# I've encountered quite a few issues with Bluetooth. Here's the fixes I've come about. ** 45 | 46 | == Not being able to power on the bluetooth device, or device not found in bluetoothctl == 47 | **# Failed to set power on: org.bluez.Error.Blocked (**//bluetoothctl//**)** 48 | **# You can check and see, if the device is up/down** 49 | $ hciconfig 50 | 51 | **# And be able to turn the device on with ** 52 | $ hciconfig hci0 up 53 | 54 | **# But you might get a '**//Can't init device hci0: Operation not possible due to RF-kill (132)//**'** 55 | **# This means some software is blocking the device.. Great** 56 | **# We're be able to check further with **//rfkill// 57 | **# **//rfkill//** is a package that can manage wireless devices** 58 | $ pacman -S rfkill 59 | 60 | **# Running **//rfkill//** might give you an output like this** 61 | 0: hci0: Bluetooth 62 | Soft blocked: yes **# soft-blocked.. Those bastards!** 63 | Hard blocked: no 64 | 65 | **# Unblock it ** 66 | **# Note the index no. above, in this example it's 0 (zero)** 67 | $ rfkill unblock 0 68 | -------------------------------------------------------------------------------- /Buku.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-20T00:38:51+01:00 4 | 5 | ====== Buku ====== 6 | Created Friday 20 January 2017 7 | 8 | **Buku is a CLI tool for managing URLs.** 9 | 10 | == Installation == 11 | **# The **//buku//** package** 12 | $ yaourt -S buku 13 | 14 | **# To add auto-complete feature for Buku, create a file in **///usr/share/zsh/functions/Completion/_buku // 15 | **# And add the content of **https://github.com/jarun/Buku/blob/master/auto-completion/zsh/_buku 16 | **# Then reload Zsh** 17 | $ compinit 18 | 19 | **# **//Rofi//** like run panel (**//Ctrl+Alt+b//**)** 20 | $ yaourt -S buku_run-git 21 | 22 | **# The **//bukuadd//** script requires **//xsel //**(**//alt+b//**)** 23 | $ pacman -S xsel 24 | 25 | == Database == 26 | **# My Buku bookmark database file is stored on Dropbox** 27 | **# Symlink to the default Buku db location** 28 | $ ln -s /home/stick/Dropbox/buku/bookmarks.db /home/stick/.local/share/buku/ 29 | 30 | 31 | ===== Usage ===== 32 | **# Buku defines bookmarks by 3 key values; Title, Tags (category) and Comments ** 33 | **#** **(and the URL of course)** 34 | **# **//> //**=** **title** 35 | **# **//+//** = comment** 36 | **# **//# //** = tags (category)** 37 | 38 | == Easy Handling (Rofi integration a.a.) == 39 | **# To easily add a link, Copy it (**//Ctrl+c//**) and hit **//Alt+b// 40 | **# Easily Search bookmark in Rofi like environment with **//Ctrl+Alt+b// 41 | 42 | 43 | ==== Listing Bookmarks ==== 44 | **# Append **//-p//** to list (print) your bookmarks** 45 | **# You can specify a specific index-number, to list information about that bookmark** 46 | $ buku -p //// 47 | 48 | **# You can also specify a range for the bookmarks you want listed** 49 | $ buku -p 10-20 50 | 51 | **# If **//-p//** is left blank, all bookmarks will be listed** 52 | 53 | 54 | ==== Searching Bookmarks ==== 55 | **# Append **//-s //**to search ANY keyword ** 56 | **# Append** //-S//** to search ALL keywords** 57 | **# Append **//--stag//** to search Tags** 58 | **# Append **//--deep//** to make a 'loose' search - Ex. **//note//** lists **//notebook//** too** 59 | 60 | **# When you Search, you will be prompted to do additional actions** 61 | **# **//q//** to quit** 62 | **# **//a//** to open ALL the listed links** 63 | **# **//s//** specify additional search criteria ** 64 | **# **//?//** for additional actions ** 65 | 66 | == Any == 67 | **# If you append the **//-s//** all bookmarks, with any of the keywords, will be listed** 68 | $ buku -s category1, category2 69 | 70 | == All == 71 | **# If you append the **//-S//** the bookmarks needs to match ALL of the keywords** 72 | **# **//-S //**comes with a couple of unique keywords** 73 | **# **//immutable//** = Entries with locked title** 74 | **# **//blank//** = Entries with a blank title** 75 | 76 | 77 | == Tags == 78 | **# To search for specific tag** 79 | $ buku --stag //category// 80 | 81 | **# If **//--stag//** is left blank, ALL tags will be listed** 82 | 83 | == Loose == 84 | **# For wildcard searching, append the **//-s//** and **//--deep// 85 | **# Ex, below will also find **//category// 86 | $ buku -s cat --deep 87 | 88 | 89 | ==== Add Bookmarks ==== 90 | **# Append **//-a//** to add a new bookmark** 91 | 92 | == Bukuadd Script == 93 | **# **//~/dotfiles/scripts/bukuadd.sh//** lets you add the latest content of Clipboard to Buku** 94 | **# Copy a URL in the browser and hit **//Alt+b// 95 | 96 | == Tags (categories) == 97 | **# Tags needs to be defined right after the URL - no need to append a option (ex, **//--tags//**)** 98 | **# You can add multiple categories in a comma-separated list** 99 | $ //buku// //-a category1, category2// 100 | 101 | == Title == 102 | **# Titles - unless specified - is automatically set by the URLs title** 103 | **# To define your own title, append **//--immutable 1//** and **//-t // 104 | $ buku -a // //-t // //--immutable 1 105 | 106 | **# If **//-t//** is left blank, no title will be set** 107 | 108 | == Comments == 109 | **# Attach Comments with **//-c// 110 | $ buku -a //<URL> //-c This is a comment 111 | 112 | 113 | ==== Edit Bookmarks ==== 114 | **# Append **//-u//** to edit (update) bookmarks** 115 | 116 | == Title == 117 | **# To update the Title to the URLs title** 118 | $ buku -u //<INDEX>// 119 | 120 | **# Or to update it with your own title (as explained above)** 121 | $ buku -u //<INDEX> //-t //<TITLE>// --immutable 1 122 | 123 | == URL == 124 | **# To update the URL in a bookmark, append the **//--url// 125 | $ buku -u //<INDEX>// --url //<NEW_URL>// 126 | 127 | == Tags == 128 | **# Tags can modified by appending **//--tag// 129 | **# To add additional tags, use the **//+//** operator** 130 | $ buku -u //<INDEX> //--tag + category1, category2 131 | 132 | **# To delete tags, use the **//-//** operator** 133 | $ buku -u //<INDEX> --tag - //category1, category2 134 | 135 | **# If neither the **//+//** or**// -//** operator is used, the current tags will be overwritten ** 136 | 137 | == Comments == 138 | **# To add/overwrite a comment** 139 | $ buku -u //<INDEX> //-c This is a new comment 140 | 141 | **# If **//-c//** is left blank, the current comment will be deleted** 142 | 143 | 144 | ==== Deleting Bookmarks ==== 145 | **# Append **//-d//** to delete bookmarks** 146 | **# You can space-separate index values, to delete multiple bookmarks** 147 | **# Ex, to delete 10, 15 and 20** 148 | $ buku -d 10 15 20 149 | 150 | **# You can also delete a range** 151 | **# Ex, ALL bookmarks in the range of 10 to 20** 152 | $ buku -d 10-20 153 | 154 | 155 | ==== Encryption ==== 156 | **# You are able to lock/unlock your bookmarks** 157 | **# To lock it (encrypt with 8 hash iterations) ** 158 | $ buku -l 159 | 160 | **# To open (decrypt)** 161 | $ buku -k 162 | -------------------------------------------------------------------------------- /CPU.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T18:12:13+02:00 4 | 5 | ====== CPU ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **#** **To monitor CPU speed in real time, run ** 9 | $ watch grep \"cpu MHz\" /proc/cpuinfo 10 | 11 | == Thermald == 12 | **# Will help keep your system at a accepted temperature** 13 | $ yaourt -S thermald 14 | 15 | == i7z == 16 | **# Reporting tool for Intel processors** 17 | $ pacman -S i7z 18 | 19 | **# Invoke with ** 20 | $ i7z 21 | $ i7z-gui 22 | 23 | == CpuPower == 24 | **# Assists with CPU frequency scaling** 25 | $ pacman -S cpupower 26 | 27 | **# You can load a specific governor at boot-time by defining it in **///etc/default/cpupower// 28 | **# Ex;** 29 | {{{code: lang="texinfo" linenumbers="True" 30 | governor='performance' 31 | }}} 32 | 33 | 34 | **#** **Enable the service** 35 | $ systemctl enable cpupower.service 36 | 37 | **# There are a couple of different Governors, which will have impact on the systems performance** 38 | **# These seems to be the most common Governor settings;** 39 | **# **//performance //**= Run the CPU at maximum frequency ** 40 | **# **//powersave //**= Run the CPU at minimum frequency ** 41 | **# **//ondemand//** = Scales the frequency dynamically according to the current load** 42 | 43 | **# To activate a particular Governor, ex **//performance// 44 | $ cpupower frequency-set -g performance 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Clean_the_Filesystem.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T22:35:50+02:00 4 | 5 | ====== Clean the Filesystem ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | ==== Cleaning the package cache ==== 9 | **# Pacman stores downloaded packages in** ///var/cache/pacman/pkg// 10 | **# and it does not remove these versions automatic.** 11 | 12 | **# To remove all cached versions of uninstalled packages** 13 | $ paccache -ruk0 14 | 15 | **#** **To remove remaining, installed, cache packages except for the most recent 2 versions** 16 | $ paccache -rk 2 17 | 18 | 19 | ==== Removing orphans (unused packages) ==== 20 | **# To list packages no longer used** 21 | $ pacman -Qdt 22 | 23 | **#** **To remove orphans** 24 | $ pacman -Rns $(pacman -Qtdq) 25 | 26 | **# If the above returns** //error: no targets specified //**no orphans were found.** 27 | 28 | 29 | ==== Old configuration files ==== 30 | **# You can manually go through folders and clean up old configuration files from uninstalled packages. ** 31 | **# Some typical destinations may be;** 32 | ~/.config/ 33 | ~/.cache/ 34 | ~/.local/share/ 35 | 36 | 37 | ==== Broken symlinks ==== 38 | **# Broken symlinks should be removed. ** 39 | **#** **To list all broken symlinks** 40 | $ find . -type l -! -exec test -e {} \; -print 41 | 42 | 43 | ==== Review installed packages ==== 44 | **# Review a list of your installed packages - there might be some you don't use anymore^** 45 | $ pacman -Qet **# List installed packages (not dependencies)** 46 | 47 | 48 | ==== Tips and Tricks ==== 49 | **# Some random Tips and Tricks** 50 | 51 | == BeachBit == 52 | **# BleachBit can help you clean the system by removing unwanted files. ** 53 | **#** **Be careful though. I think this has caused issues for my **//Firefox//**, ** 54 | **#** **so I'd disable cleaning that when running.** 55 | $ pacman -S bleachbit 56 | -------------------------------------------------------------------------------- /Cmus.txt: -------------------------------------------------------------------------------- 1 | ====== Cmus ====== 2 | Created Thursday 16 February 2017 3 | 4 | **Cmus is a CLI music player.** 5 | 6 | == Installation == 7 | $ pacman -S cmus 8 | 9 | 10 | ===== Scripts ===== 11 | **#** **You can extend Cmus functionality with scripts; **https://github.com/cmus/cmus/wiki 12 | **# Here are some of the favorites^** 13 | 14 | == Desktop Notifications == 15 | **# Requires notify-send (Dunst)** 16 | **# **https://github.com/cmus/cmus/wiki/status_diplay_notify_send.py 17 | **# Download and place the script in **//~/.config/cmus/status.py //**and make it executable ** 18 | $ chmod a+x ~/.config/cmus///status.py// 19 | 20 | **# In Cmus, navigate to the Settings screen (**//7//**)** **and search for (**/////**) **//status_display_program// 21 | **# Define it to our script; **status_display_program=/home/stick/.config/cmus/status.py 22 | 23 | 24 | ===== Usage ===== 25 | **# There is 7 different screen in Cmus, navigate these with **//1, 2, 3, 4, 5, 6//** and **//7// 26 | 1 **= Now playing (simple view)** 27 | 2 **= Library** 28 | 3 **= Playlist** 29 | 4** = Queue** 30 | 5 **= Add Music** 31 | 6 **= Library Filters** 32 | 7 **= Settings/Keybinds** 33 | 34 | 35 | == Adding music to your Library == 36 | **# Navigate to the fifth screen, **//5// 37 | **# Then add the folder/song to your library with **//a// 38 | **# This should move your highlight one folder/song down. ** 39 | **#** **This means the folder/song you just added is available in your library. ** 40 | 41 | ==== Basic Controls ==== 42 | **# Move to your Simple View screen, **//1// 43 | 44 | == Navigation == 45 | **# Switch between **//Artist/Album//** and **//Track//** window with **//<Tab>// 46 | **# To expand a **//Artist/Album//** folder, use **//Space// 47 | 48 | == Playing Tracks == 49 | **# Play track with **//Enter// 50 | **# Pause/Play with **//c// 51 | **# Toggle shuffle with **//s// 52 | **# Next track with **//b// 53 | **# Previous track with **//z// 54 | 55 | == Searching == 56 | **# Search for Tracks, Artist or Albums with **/ 57 | **# Next result with **//n// 58 | **# Previous result with **//N // 59 | 60 | == Jump in Tracks == 61 | **# Backward/Forward 10sec with **//Left / Right// 62 | **# Backward/Forward 1min with **//< / >// 63 | 64 | == Volume Control == 65 | **# Volume Up/Down with **//- / +// 66 | 67 | == Queue == 68 | **# Add a track to Queue with **//e// 69 | 70 | 71 | ===== Tips and Tricks ===== 72 | **# Some sweet additions ** 73 | 74 | == Music Visualizer == 75 | **# **//Cava//** can be used to nice CLI visualization of the music playing** 76 | $ yaourt -S cava 77 | 78 | **# Then edit **//~/.config/cava/config //**and uncomment these two lines;** 79 | {{{code: lang="texinfo" linenumbers="True" 80 | method = pulse 81 | source = auto 82 | }}} 83 | 84 | 85 | **# Usage** 86 | **# You can Increase/Decrease sensitivity with **//Up / Down// 87 | **# Increase/Decrease bar width with **//Left / Right// 88 | **# Change bar color with **//c// 89 | **# Change background color with **//b// 90 | -------------------------------------------------------------------------------- /Cower.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-22T13:29:52+01:00 4 | 5 | ====== Cower ====== 6 | Created Wednesday 22 February 2017 7 | 8 | **Cower will search and download packages from the AUR, which will include the **//PKGBUILD//** that we can use with **//makepkg//**. Cower is installed in the **//makepkg//** article. ** 9 | 10 | == Configuration == 11 | **# Cower configuration file can be found at Github and is read from **//~/.config/cower/config// 12 | 13 | 14 | ===== Usage ===== 15 | **# Cower works quite a lot like Pacman. ** 16 | 17 | == Searching == 18 | **# Search packages (space separated list)** 19 | $ cower -s //<PACKAGE_NAME> <PACKAGE_NAME2>// 20 | 21 | **# Or get information about a package ** 22 | $ cower -i //<PACKAGE_NAME>// 23 | 24 | == Packages and Updates == 25 | **# My config (Github) will download all packages to **//~/makepkg/packages/// 26 | **# To download a package ** 27 | $ cower -d //<PACKAGE_NAME>// 28 | 29 | **# To check for Updates** 30 | $ cower -u 31 | 32 | **# You can also download updates by passing the **//-d//** flag along** 33 | $ cower -ud 34 | 35 | == Updates (or large amount of packages) == 36 | **# Custom script and alias available to iterate through **//PKGBUILDS//** with the editor,** 37 | **# and a function that can bulk install the downloaded updates.** 38 | 39 | **# To view all the new **//PKGBUILDS//** in the **//Gvim// 40 | $ cownew 41 | 42 | **# Once you've gone through the PKGBUILDS, install them ** 43 | $ cowup 44 | 45 | **# This can also be used if you just downloaded a lot of package from the AUR and would like** 46 | **# to bulk install em - meaning; that this is not update specific, but that will most likely have the ** 47 | **# most use-cases. ** 48 | -------------------------------------------------------------------------------- /Cron.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-14T02:47:43+01:00 4 | 5 | ====== Cron ====== 6 | Created Saturday 14 January 2017 7 | 8 | **By default, Arch doesn't come with a Cron implementation. We'll be using **//cronie//** which handles scheduled jobs, even if the computer was shut down when the job was supposed to run.** 9 | 10 | == Installation == 11 | $ pacman -S cronie 12 | 13 | **# And enable its service file** 14 | $ systemctl enable cronie.service 15 | 16 | **# In order to use Cron, a user needs to be a member of the **//users//** group (not default)** 17 | $ gpasswd --add stick users 18 | 19 | 20 | ===== Usage ===== 21 | **# If you installed **//SSMTP//** in the previous step, you will be notified when a job has been run** 22 | **# Cron can be used in two ways - place executable Shell scripts in one of the job folders.** 23 | **# This will execute the file in the appropriate time according to which folder the script is located** 24 | **# Places for Shell executable ** 25 | ** # **///etc/cron.hourly// 26 | ** # **///etc/cron.daily// 27 | ** # **///etc/cron.weekly // 28 | 29 | **# Or, you place a Cron command inside the crontab file, which is provided for each user.** 30 | **# The basic format for Cron is; (separated with a space)** 31 | //<MINUTE> <HOUR> <DAY_OF_MONTH> <MONTH> <DAY_OF_WEEK> <COMMAND>// 32 | **#** //<MINUTE> //**: from 0 to 59** 33 | **#** //<HOUR> //**: from 0 to 23** 34 | **#** //<DAY_OF_MONTH> //**: from 1 to 31** 35 | **#** //<MONTH> //**: from 1 to 12** 36 | **#** //<DAY_OF_WEEK> //**: 0 to 6 where 0 is Sunday** 37 | **#** //<COMMAND> //**: The command to run** 38 | 39 | **# Cron also has some basic keywords;** 40 | //@reboot //**: at startup** 41 | //@yearly//** : once a year** 42 | //@annually //**: same as yearly** 43 | //@monthly //**: once a month** 44 | //@weekly //**: once a week** 45 | //@daily //**: once a day** 46 | //@midnight //**: same as daily** 47 | //@hourly //**: once an hour** 48 | 49 | **# Ex; **//@reboot ~/bin/i_love_cron.sh //**will execute the script at startup** 50 | 51 | == Basic Commands == 52 | **# To view Crontabs (tasks)** 53 | $ contab -l 54 | 55 | **# To edit Crontabs** 56 | $ crontab -e 57 | 58 | **# Or edit root jobs (system based) with sudo** 59 | $ sudo crontab -e 60 | 61 | **# To remove all Crontabs** 62 | $ crontab -r 63 | 64 | == Examples and further Syntax explained == 65 | **# Using the crontab/cron syntax** 66 | 67 | **# * (star) is used as wildcard - ex, every hour, every day, every month (15min. past)** 68 | 15 * * * * someCommand 69 | 70 | **# , (comman) is used to specify multiple time - ex, at 12 and 16 o'clock ** 71 | 00 12,16 * * * someCommand 72 | 73 | **# / (slash) to specify a interval - ex to run something every 10min.** 74 | */10 * * * * someCommand 75 | 76 | **# - (subtract) is to specify a range - ex, 1215 daily, except the summer months (June, July & August)** 77 | 15 12 * 1-5,9-12 * someCommand 78 | -------------------------------------------------------------------------------- /DKMS.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-22T04:42:03+01:00 4 | 5 | ====== DKMS ====== 6 | Created torsdag 22 december 2016 7 | 8 | **Dynamic Kernel Module Support - handles rebuild of package modules residing outside the kernel three. This means, that modules will be rebuild when new kernels are installed - instead of waiting for maintainer to release new build.** 9 | 10 | == Installation == 11 | $ pacman -S dkms 12 | 13 | **# DKMS also need the headers for ALL the installed kernels. ** 14 | **# Let's assume you have the **//zen//** and **//lts//** kernels installed** 15 | $ pacman -S linux-zen-headers linux-lts-headers 16 | 17 | **# Only packages I've come along so far;** 18 | **# Nvidia Driver** 19 | $ pacman -S nvidia-dkms 20 | 21 | **# VirtualBox** 22 | $ pacman -S virtualbox-host-dkms 23 | $ pacman -S virtualbox-guest-dkms 24 | 25 | 26 | ===== Usage ===== 27 | **# Doubt you'll ever invoke dkms in anything.** 28 | **# You can see which DKMS packages you have installed though** 29 | $ dkms status 30 | 31 | **# To rebuild all modules on current kernel ** 32 | $ dkms autoinstall 33 | 34 | 35 | ===== Tips and Tricks ===== 36 | **# Though, again, probably never used, you can add DKMS auto-complete to your Shell** 37 | **# Add the following to your **//.bashrc/.zshrc//** file.** 38 | {{{code: lang="texinfo" linenumbers="True" 39 | source /usr/share/bash-completion/completions/dkms 40 | }}} 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /DPMS.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-26T05:44:50+01:00 4 | 5 | ====== DPMS ====== 6 | Created mandag 26 december 2016 7 | 8 | **Display Power Management Signaling (DPMS) is easiest defined with **//xset// 9 | 10 | == Installation == 11 | $ pacman -S xorg-xset 12 | 13 | == Usage == 14 | **# Note that xset values can be defined in **xinitrc **or in other scripts use. ** 15 | 16 | **# To query your current settings** 17 | $ xset q 18 | 19 | **# To see all available commands** 20 | $ xset 21 | 22 | | Command | Description | 23 | |:------------------------|:----------------------------------------------------| 24 | | xset s off | Disable screen blanking | 25 | | xset s 3600 3600 3600 | Change blank time to 1 hour (standby, suspend, off) | 26 | | xset -dpms | Turn off DPMS | 27 | | xset s off -dpms | Disable DPMS and prevent blanking | 28 | | xset dpms force off | Turn off screen | 29 | | xset dpms force suspend | Standby screen | 30 | | xset dpms force suspend | Suspend screen | 31 | 32 | -------------------------------------------------------------------------------- /Desktop_Entries.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-17T02:47:46+01:00 4 | 5 | ====== Desktop Entries ====== 6 | Created Tuesday 17 January 2017 7 | 8 | **Desktop Entries are the configurations that describe how an application should run - along with appearance (icon etc) in menu entries. ** 9 | 10 | == General == 11 | **# Desktop entries resides in and must end with **//.desktop//**;** 12 | **# **///usr/share/applications// 13 | **# **///usr/local/share/applications// 14 | **# **//~/.local/share/applications //**# Takes precedence over the above two** 15 | 16 | **# A **//.desktop//** template;** 17 | {{{code: lang="texinfo" linenumbers="True" 18 | [Desktop Entry] 19 | 20 | # Can be; Application, Link (web-link), Directory 21 | Type=Application 22 | 23 | # The version of the desktop entry specification to which this file complies 24 | Version=1.0 25 | 26 | # The name of the application 27 | Name=jMemorize 28 | 29 | # A comment which can/will be used as a tooltip 30 | Comment=Flash card based learning tool 31 | 32 | # The path to the folder in which the executable is run 33 | Path=/opt/jmemorise 34 | 35 | # The executable of the application, possibly with arguments. 36 | Exec=jmemorize 37 | 38 | # The name of the icon that will be used to display this entry 39 | Icon=jmemorize 40 | 41 | # Describes whether this application needs to be run in a terminal or not 42 | Terminal=false 43 | 44 | # Describes the categories in which this entry should be shown 45 | Categories=Education;Languages;Java; 46 | 47 | }}} 48 | 49 | 50 | == Hide Desktop Entries == 51 | **# To make sure the **//.desktop//** entry does not get overwritten, first copy it to **//~/.local/share/applications// 52 | **# (Create the folder if necessary)** 53 | $ cp /usr/share/applications///<APPLICATION_ENTRY> //~/.local/share/applications 54 | 55 | **# Then Edit your copied entry, and add the following line** 56 | {{{code: lang="texinfo" linenumbers="True" 57 | NoDisplay=true 58 | }}} 59 | 60 | 61 | == Modify Environment Variables == 62 | **# Copy the **//.desktop//** entry (as explained above) and Edit the **//Exec//** line by adding **//env// 63 | **# Ex;** 64 | {{{code: lang="texinfo" linenumbers="True" 65 | Exec=env LANG=he_IL.UTF-8 abiword %U 66 | }}} 67 | -------------------------------------------------------------------------------- /Disable_Watchdog.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-03-30T02:51:50+02:00 4 | 5 | ====== Disable Watchdog ====== 6 | Created Thursday 30 March 2017 7 | 8 | **Watchdog is not needed in our case (mainly servers I believe). ** 9 | 10 | == Boot Parameter == 11 | **# To disable the Watchdog, add **//nowatchdog//** to the boot parameter** 12 | **# Edit **///etc/default/grub //**and edit the **//GRUB_CMDLINE_LINUX_DEFAULT //**variable** 13 | {{{code: lang="texinfo" linenumbers="True" 14 | GRUB_CMDLINE_LINUX_DEFAULT="quite splash nowatchdog" 15 | }}} 16 | 17 | 18 | **# And generate a new grub-config** 19 | $ grub-mkconfig -o /boot/grub/grub.cfg 20 | 21 | 22 | == Blacklist Module == 23 | **# Once disabled, blacklist the module from loading ** 24 | **# Edit/create **///etc/modprobe.d/blacklist.conf //**and add the following to a new line** 25 | {{{code: lang="texinfo" linenumbers="True" 26 | install iTCO_wdt /bin/false 27 | }}} 28 | -------------------------------------------------------------------------------- /Display_Driver.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T21:04:41+02:00 4 | 5 | ====== Display Driver ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **This will cover the installation and configuration of display drivers for intel and nvidia - along with optimus management with bumblebee.** 9 | 10 | == NOTE ! == 11 | **Be sure, that if you're are gonna use additional kernels, that you install and configure these kernels BEFORE you install your graphic drivers. Otherwise you will have to do these steps again.** 12 | 13 | 14 | ===== Intel HD ===== 15 | **# Provided by the **//mesa//** driver** 16 | 17 | == Installation == 18 | **# Install the following packages (32-bit support included)** 19 | $ pacman -S mesa xf86-video-intel mesa-libgl lib32-mesa-libgl mesa-demos 20 | 21 | == Configuration == 22 | **# Get the BusID** 23 | $ lspci | grep -E "VGA|3D" 24 | 25 | **# Note down the** xx:xx.x **value and convert the string from** xx : xx . x **to** xx : xx : x 26 | 27 | **# Create a configuration file in **/etc/X11/xorg.conf.d/20-intel.conf 28 | {{{code: lang="texinfo" linenumbers="True" 29 | Section "Device" 30 | Identifier "Intel Graphics" 31 | Driver "intel" 32 | BusID "00:02:0" # Make sure it matches above output ! 33 | EndSection 34 | }}} 35 | 36 | 37 | 38 | ===== nVidia ===== 39 | **# The **//nvidia//** driver has already been installed with **//DKMS// 40 | **# Follow these steps to complete the **//nvidia//** setup.** 41 | 42 | == Installation == 43 | **# Install the following packages (32-bit support included)** 44 | $ pacman -S nvidia-utils lib32-nvidia-utils nvidia-settings 45 | 46 | == Configuration == 47 | **# Get the BusID the same way as the example above (Intel HD)** 48 | **# Create a configuration file in **///etc/X11/xorg.conf.d/20-nvidia.conf// 49 | {{{code: lang="texinfo" linenumbers="True" 50 | Section "Device" 51 | Identifier "nvidia" 52 | Driver "nvidia" 53 | BusID "03:00:0" # Make sure it matches the nvidia bus ! 54 | EndSection 55 | }}} 56 | 57 | 58 | 59 | ===== Bumblebee ===== 60 | **# For the Optimus technology ** 61 | 62 | == Installation == 63 | **#** **The following packages is needed (32-bit support included)** 64 | $ pacman -S bumblebee lib32-virtualgl 65 | 66 | **# Add user to the bumblebee group** 67 | $ gpasswd -a //<USERNAME>// bumblebee 68 | 69 | **#** **Enable the **//bumblebeed.service//** and reboot your system** 70 | $ systemctl enable bumblebeed.service 71 | $ reboot 72 | 73 | == Confirm Installation == 74 | **# Check if your installation works as intended** 75 | $ optirun glxspheres64 76 | 77 | 78 | ==== Configuration ==== 79 | **#** **The bumblebeed main configuration file can be found at** ///etc/bumblebee/bumblebee.conf// 80 | 81 | == Compression == 82 | **# You can change/test the different compression methods** 83 | $ optirun -c <compress-method> 84 | 85 | **# Compressed methods, that adds load to the CPU** 86 | jpeg, rgb or yuv 87 | 88 | **# Uncompressed methods, that adds load to the GPU** 89 | proxy or xv 90 | 91 | **# I THINK, that proxy is my preferred option. ** 92 | **# Less FPS and performance, but seems not to load the system as much.** 93 | 94 | **#** **Persistent change for all application.** Proxy **is the default.** 95 | **#** **Edit the configuration file and add your preferred** <compress-method> **to** //VGLTransport=// 96 | {{{code: lang="texinfo" linenumbers="True" 97 | VGLTransport=proxy 98 | }}} 99 | 100 | 101 | == Pixel Readback == 102 | **# Setting **//VGL_READBACK//** to **//pbo//** should have improved performance - I did not notice any though**. 103 | **# The default value;** 104 | $ VGL_READBACK=sync optirun glxspheres64 105 | 106 | **# To change the PR to **//pbo//**;** 107 | $ VGL_READBACK=pbo optirun glxspheres64 108 | 109 | **# Persistent change** 110 | **#** **The** **preferred option can be set in the configuration file.** 111 | {{{code: lang="texinfo" linenumbers="True" 112 | VGL_READBACK=pbo 113 | }}} 114 | 115 | 116 | == General Usage == 117 | **# To run an application with the dedicated GPU (nvidia) ** 118 | $ optirun application [application-parameter] 119 | 120 | **#** **Ex. :** 121 | $ optirun firefox https://sloa.dk 122 | 123 | **# To open the nvidia settings panel** 124 | $ optirun -b none nvidia-settings -c :8 125 | -------------------------------------------------------------------------------- /Downgrading.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T00:06:44+02:00 4 | 5 | ====== Downgrading ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **Package from an earlier stage can be found in** ///var/cache/pacman/pkg/// 9 | **Unless it has been cleared with **//paccache//** of course.** 10 | 11 | == Downgrade a package == 12 | **# To downgrade a package and its dependencies ** 13 | $ cd /var/cache/pacman/pkg/ 14 | $ pacman -U //<PACKAGE_NAME>// 15 | 16 | **# You can then add it (temporarily) to be ignored on upgrades** 17 | **# Edit** ///etc/pacman.conf //**and add the package name to** //IgnorePkg= // 18 | **# Ex. (For multiple entries, use a space-separated list)** 19 | {{{code: lang="texinfo" linenumbers="True" 20 | IgnorePkg=mplayer vlc 21 | }}} 22 | 23 | 24 | == Downgrading the kernel : == 25 | **# As minimum, downgrade **//linux, linux-headers//** and **//linux modules//**.** 26 | **# Ex.** 27 | $ pacman -U linux-3.5.6-1-x86_64.pkg.tar.xz linux-headers-3.5.6-1-x86_64.pkg.tar.xz virtualbox-host-modules-4.2.0-5-x86_64.pkg.tar.xz 28 | 29 | -------------------------------------------------------------------------------- /Dunst.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-25T02:24:05+01:00 4 | 5 | ====== Dunst ====== 6 | Created søndag 25 december 2016 7 | 8 | **Dunst is a simple notification - It will catch notifications from **//libnotify //**and display them to the user.** 9 | 10 | == Installation == 11 | $ pacman -S libnotify dunst 12 | 13 | **# Start Dunst through your **xinitrc **file** 14 | {{{code: lang="texinfo" linenumbers="True" 15 | dunst & 16 | }}} 17 | 18 | 19 | == Configuration == 20 | **# Dunst reads its configuration from **//~/.config/dunst/dunstrc //**(Github)** 21 | 22 | == Usage == 23 | **# Dunst will display **//normal//** and **//low//** urgency messages for 10sec.** 24 | **# **//important//** messages will stick. ** 25 | 26 | **# mod4 = **//Super-key // 27 | **# To close all notifications** 28 | mod4+n 29 | 30 | **# To close 1 notification** 31 | mod4+Shift+n 32 | 33 | **# Message History** 34 | mod4+h 35 | 36 | 37 | ===== Create your own notifications! ===== 38 | **# You can send messages to **//libnotify//** with the **//notify-send //**command.** 39 | $ notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information 40 | 41 | **# The first string is the **//summary//**, the second is the **//body//**.** 42 | **# This could be placed in a **//.sh//** script somewhere.** 43 | 44 | == Urgency == 45 | **# You can also define the urgency of the message** 46 | **# **//low, normal//** or**// critical//** - only **//critical//** will stay longer than 10sec** 47 | **# append **//-u//** to define the urgency of the message** 48 | $ notify-send 'Hello world!' 'This is an example notification.' -u critical 49 | 50 | == Writing notifications as root == 51 | **# Get your UID - In my case, I had UID **//1000// 52 | $ //id -u // 53 | 54 | **# **//-u//** to define which user (**//stick//**)** 55 | **# Also correct the **//UID//** (1000) in the **//path=/run/usr///** string if necessary.** 56 | $ sudo -u stick DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send 'Hello world!' 'This is an example notification.' 57 | 58 | == Csharp == 59 | **# Dunst also accepts other languages - like c#** 60 | {{{code: lang="texinfo" linenumbers="True" 61 | using Notifications; 62 | public class HelloWorld { 63 | static void Main() { 64 | var Hello = new Notification(); 65 | Hello.Summary = "Hello world!"; 66 | Hello.Body = "This is an example notification."; 67 | Hello.IconName = "dialog-information"; 68 | Hello.Show(); 69 | } 70 | } 71 | }}} 72 | 73 | 74 | **# This requires a depedency though : **//pacman -S// //notify-sharp-3// 75 | **# This could be placed in a **//.cs//** file somewhere^** 76 | **# You've might noticed the **//IconName//** method** 77 | **# Icons can be fount here : **https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html 78 | 79 | 80 | ===== Tips and Tricks ===== 81 | **# A few tips for notifications** 82 | 83 | == Laptop/ Battery == 84 | **# To easily get Battery notifications, also install **//Batify// 85 | $ yaourt -S batify 86 | 87 | **# And update the udev rules** 88 | $ udevadm control --reload-rules 89 | -------------------------------------------------------------------------------- /Fail2ban.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-13T21:26:48+01:00 4 | 5 | ====== Fail2ban ====== 6 | Created Friday 13 January 2017 7 | 8 | **Fail2ban will help protect against brute force attacks, by adding the host to the IP-block list. This is done by adding rules to iptables. We'll also configure, so that a E-mail will be sent, whenever a host has been blocked. We'll added a little extra security to Fail2Ban** 9 | 10 | == Installation == 11 | $ pacman -S fail2ban 12 | 13 | **# Then enable the service** 14 | $ systemctl enable fail2ban.service 15 | 16 | ===== Configuration ===== 17 | **# We'll add a little extra security** 18 | 19 | == Allow full Read access == 20 | **# Which will also allow fail2ban to set firewall rules with iptables. ** 21 | **# Create a file in **///etc/systemd/system/fail2ban.service.d/capabilities.conf //**and add the following** 22 | {{{code: lang="texinfo" linenumbers="True" 23 | [Service] 24 | CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW 25 | }}} 26 | 27 | 28 | == Jails == 29 | **# Jails are the configuration for Fail2ban** 30 | **# It comes with paths/locations for some different distros - but not for Arch. ** 31 | **#** **The Fedora paths should work though.** 32 | $ cp /etc/fail2ban/paths-fedora.conf /etc/fail2ban/paths-archlinux.conf 33 | 34 | **# The default Jail configuration can be found at **///etc/fail2ban/jail.conf //**but this file should not be edited ** 35 | **# Instead, rules defined in the default Jail, can copied and defined to a separate file in **///etc/fail2ban/jail.d/// 36 | 37 | **# Make sure the Fedora paths has been copied ** 38 | **# Then create a file at **///etc/fail2ban/jail.d/jail.local//** and insert the following ** 39 | {{{code: lang="texinfo" linenumbers="True" 40 | [INCLUDES] 41 | before = paths-archlinux.conf 42 | }}} 43 | 44 | 45 | **# If you installed **//SSMTP//** as explained in **//Terminal (+shell)//**, add the following too for mail notifications ** 46 | {{{code: lang="texinfo" linenumbers="True" 47 | [DEFAULT] 48 | mta = mail 49 | destemail = jeppesen@tutanota.com 50 | }}} 51 | 52 | -------------------------------------------------------------------------------- /Feh.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-19T02:37:39+01:00 4 | 5 | ====== Feh ====== 6 | Created mandag 19 december 2016 7 | 8 | **Feh can be used as both your image viewer and wallpaper manager. ** 9 | 10 | == Installation == 11 | $ pacman -S feh 12 | 13 | ===== Image Viewer ===== 14 | **# To browse images in a specific folder, you can invoke **//Feh//** as follows** 15 | $ feh -g 640x480 -d -S filename /path/to/directory 16 | 17 | **# **//-g //**= no larger than 640x480** 18 | **# **//-d//** = will get the filename as well** 19 | **# **//-S//** = sort by (**//filename//** in this example)** 20 | 21 | == SVG images == 22 | **# This requires the **//imagemagick//** package** 23 | $ pacman -S imagemagick 24 | 25 | **# Then open SVG images with** 26 | $ feh --magick-timeout 1 file.svg 27 | 28 | 29 | ===== Wallpaper manager ===== 30 | **# Background script found on Github.** 31 | **# Copy your background script into your **//~/dotfiles/scripts//** folder and start it from **xinitrc**.** 32 | ./home/stick/dotfiles/scripts/background & 33 | 34 | -------------------------------------------------------------------------------- /Fn-key.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-26T20:24:02+01:00 4 | 5 | ====== Fn-key ====== 6 | Created mandag 26 december 2016 7 | 8 | **Getting the Function-key to work took a little more work than I anticipated. ** 9 | **Out of the box **//monitor-off //**and **//wifi-off//** worked (sort of)** 10 | 11 | **I was missing **//keyboard/screen-backlight, audio //**and **//touchpad//** controls.** 12 | 13 | **The **//wifi-off//** worked somewhat. ** 14 | **It turns off the WIFI, but is unable to re-connect when re-enabled.** 15 | 16 | **All of the key-presses was registered, and produced a **[[wiki.linuxquestions.org/wiki/XF86_keyboard_symbols|xf86*-multimedia output]]**.** 17 | **Well.. all except **//keyboard-backlight//** which is caused by a bug (fix below)** 18 | 19 | **This article will take help combine the **//xf86*-multimedia//** key-press with a function.** 20 | 21 | == Screen Backlight == 22 | **#** **There is a** **bug causing **//FN+F5/F6//** not to produce any output at all.** 23 | **# This can be resolved by adding **//acpi_osi= //**as a kernel module. ** 24 | 25 | **# Edit **///etc/default/grub//** and add **//acpi_osi=//** to the end of **//CMDLINE_LINUX_DEFAULT// 26 | **# Ex.** 27 | {{{code: lang="texinfo" linenumbers="True" 28 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=bfq acpi_osi=" 29 | }}} 30 | 31 | 32 | **# Generate new grub.cfg** 33 | $ grub-mkconfig -o /boot/grub/grub.cfg 34 | 35 | **# No further configuration is needed for the **//Screen-Backlight//**.** 36 | 37 | ===== Xbindkeys ===== 38 | **# **//Xbindkeys//** can be used to bind a key-press with a function.** 39 | **# **//Xbindkeys//** reads its configuration from **//~/.xbindkeysrc //**(Github)** 40 | 41 | **# Install the **//Xbindkeys//** package** 42 | $ pacman -S xbindkeys 43 | 44 | **# To autostart **//Xbindkeys//**, add it to your **xinitrc. 45 | xbindkeys & 46 | 47 | **# To get valueable information about a key-press** 48 | $ xbindkey -k 49 | 50 | **# This will produce 3 lines. Ex.** 51 | "(Scheme function)" 52 | m:0x0 + c:121 53 | XF86AudioMute 54 | 55 | **# First line can be replaced with a command to run** 56 | **# Second and Third line can be used as binding parameters.** 57 | **# We just need one of the last two lines, and we'll be using the **//xf86*//** value.** 58 | 59 | **# All of these definings will be added to our **//~/.xbindkeysrc//** file.** 60 | 61 | == Volume Controls == 62 | **# Requires PulseAudio and Pulseaudio-ctl** 63 | **# Toggle mute ** 64 | {{{code: lang="texinfo" linenumbers="True" 65 | "pulseaudio-ctl mute" 66 | XF86AudioMute 67 | }}} 68 | 69 | 70 | **# Volume Up** 71 | {{{code: lang="texinfo" linenumbers="True" 72 | "pulseaudio-ctl up" 73 | XF86AudioRaiseVolume 74 | }}} 75 | 76 | 77 | **# Volume Down** 78 | {{{code: lang="texinfo" linenumbers="True" 79 | "pulseaudio-ctl down" 80 | XF86AudioLowerVolume 81 | }}} 82 | 83 | 84 | == Keyboard Backlight == 85 | **# We wont get the full experience with 3 steps backlight strenght - rather a 1 setting on/off** 86 | **# This is still preferable from the lousy **//asus-kbd-backlight//** package from AUR, which works for 5 min.** 87 | **# Install the **//upower //**package (used by all major DE basically) ** 88 | $ pacman -S upower 89 | 90 | **# Add these two snippets to the **//~/.xbindkeysrc// 91 | {{{code: lang="texinfo" linenumbers="True" 92 | "dbus-send --type=method_call --print-reply=literal --system --dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:2" 93 | XF86KbdBrightnessUp 94 | 95 | "dbus-send --type=method_call --print-reply=literal --system --dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:0" 96 | XF86KbdBrightnessDown 97 | }}} 98 | 99 | 100 | == Toggle Touchpad == 101 | **# Touchpad Toggle script is found at Github.** 102 | **# My location for this script would be **//~/.dotfiles/.scripts/toggle_touchpad.sh// 103 | **# Link to that script in the **//~/.xbindkeysrc//** file.** 104 | {{{code: lang="texinfo" linenumbers="True" 105 | "~/dotfiles/scripts/toggle_touchpad.sh" 106 | XF86TouchpadToggle 107 | }}} 108 | 109 | 110 | -------------------------------------------------------------------------------- /Fonts.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-19T04:37:25+01:00 4 | 5 | ====== Fonts ====== 6 | Created mandag 19 december 2016 7 | 8 | **I will try to collect a little info about sweet fonts and optimization. ** 9 | 10 | == Sweet Fonts == 11 | **# Eye-gasm! Envy-Code** 12 | $ yaourt -S ttf-envy-code-r 13 | 14 | **# **//anonymous-pro //**is quite thin and crisp** 15 | $ yaourt -S ttf-anonymous-pro 16 | 17 | **# Some icons; **http://kageurufu.net/icons.pdf 18 | $ yaourt -S ttf-font-icons 19 | 20 | 21 | ===== Fontconfig ===== 22 | **# Fontconfig is a default library used by many linux distros. ** 23 | 24 | **# You can configure Fontconfig by picking presets in **///etc/fonts/conf.avail/// 25 | **# and Symlinking them to **//~/.config/fontconfig/conf.d/// 26 | **# Ex.** 27 | $ cd ~/.config/fontconfig/conf.d/ 28 | $ ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf 29 | 30 | **# The same rules defined in **///etc/fonts/conf.avail/// 31 | **# can also be defined in a user-configuration **//~/.config/fontconfig/fonts.conf// 32 | **# User-defined configuration can be found at Github.** 33 | **# When using the **//fonts.conf//** you should Symlink to **//50-user.conf// 34 | $ cd ~/.config/fontconfig/conf.d/ 35 | $ ln -s /etc/fonts/conf.avail/50-user.conf 36 | 37 | **# So far, the best solution I've found, is to;** 38 | **# Disable **//autohint// 39 | **# Enable **//hinter//** (actually think this is default - but hey)** 40 | **# Set **//hintstyle//** to **//hintslight// 41 | **# Enable **//subpixel-rgb //**(RGB monitor)** 42 | **# When **//subpixel-rgb//** is defined, also enable **//LCD-filter//**; ** 43 | **# The **//lcddefault//** seems to work fine.** 44 | 45 | 46 | == TeX live packages == 47 | **# By default, TeX packages are not read by Fontconfig. This will make some text render wrong/bad.** 48 | **# Correct this by installing TeX-live packages and Symlinking it to Fontconfig.** 49 | $ pacman -S texlive-core 50 | 51 | **# Symlink the location** 52 | $ ln -s /etc/fonts/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf 53 | 54 | **# Then update Fontconfig** 55 | $ fc-cache && mkfontscale && mkfontdir 56 | 57 | -------------------------------------------------------------------------------- /Functions.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T14:54:15+02:00 4 | 5 | ====== Functions ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **Functions works as Aliases. Add the preferred functions to your** //.bashrc/.zshrc// **file.** 9 | 10 | == Extract == 11 | **# Make sure you add** //shopt -s extglob// **to the** //.basrc/.zshrc// **file** 12 | **# Use with** //ex filename// 13 | {{{code: lang="texinfo" linenumbers="True" 14 | ex () 15 | { 16 | if [ -f $1 ] ; then 17 | case $1 in 18 | *.tar.bz2) tar xjf $1 ;; 19 | *.tar.gz) tar xzf $1 ;; 20 | *.bz2) bunzip2 $1 ;; 21 | *.rar) unrar x $1 ;; 22 | *.gz) gunzip $1 ;; 23 | *.tar) tar xf $1 ;; 24 | *.tbz2) tar xjf $1 ;; 25 | *.tgz) tar xzf $1 ;; 26 | *.zip) unzip $1 ;; 27 | *.Z) uncompress $1;; 28 | *.7z) 7z x $1 ;; 29 | *) echo "'$1' cannot be extracted via ex()" ;; 30 | esac 31 | else 32 | echo "'$1' is not a valid file" 33 | fi 34 | } 35 | }}} 36 | 37 | 38 | == Copy and go to dir == 39 | **# Use with** //cpg /path/to/file /new/path// 40 | {{{code: lang="texinfo" linenumbers="True" 41 | cpg (){ 42 | if [ -d "$2" ];then 43 | cp $1 $2 && cd $2 44 | else 45 | cp $1 $2 46 | fi 47 | } 48 | }}} 49 | 50 | 51 | == Move and go to dir == 52 | **# Use with** //mvg /path/to/file /new/path// 53 | {{{code: lang="texinfo" linenumbers="True" 54 | mvg (){ 55 | if [ -d "$2" ];then 56 | mv $1 $2 && cd $2 57 | else 58 | mv $1 $2 59 | fi 60 | } 61 | }}} 62 | 63 | 64 | == Arch news feed (rss) == 65 | **# Use with **//feed // 66 | {{{code: lang="texinfo" linenumbers="True" 67 | feed() { 68 | # The characters "ç, £, §" are used as metacharacters. They should not be encountered in a feed... 69 | echo -e "$(echo $(curl --silent https://www.archlinux.org/feeds/news//// | sed -e ':a;N;$!ba;s/\n/ /g') | \ 70 | sed -e 's/>/ç/g' | 71 | sed -e 's/<\/aç/£/g' | 72 | sed -e 's/href\=\"/§/g' | 73 | sed -e 's/<title>/\\n\\n\\n :: \\e[01;31m/g' -e 's/<\/title>/\\e[00m ::\\n/g' | 74 | sed -e 's/<link>/ [ \\e[01;36m/g' -e 's/<\/link>/\\e[00m ]/g' | 75 | sed -e 's/<description>/\\n\\n\\e[00;37m/g' -e 's/<\/description>/\\e[00m\\n\\n/g' | 76 | sed -e 's/<pç/\n/g' | 77 | sed -e 's/<bç\|<strongç/\\e[01;30m/g' -e 's/<\/bç\|<\/strongç/\\e[00;37m/g' | 78 | sed -e 's/<a[^§]*§\([^\"]*\)\"[^ç]*ç\([^£]*\)[^£]*£/\\e[01;32m\2\\e[00;37m \\e[01;34m[ \\e[01;35m\1\\e[00;37m\\e[01;34m ]\\e[00;37m/g' | 79 | sed -e 's/<liç/\n \\e[01;34m*\\e[00;37m /g' | 80 | sed -e 's/<[^>]*>/ /g' | 81 | sed -e 's/<[^ç]*ç//g' | 82 | sed -e 's/[磧]//g')\n\n" 83 | } 84 | }}} 85 | 86 | 87 | == Disable monitor blank for 2 hours == 88 | **# Use with** blank 89 | {{{code: lang="texinfo" linenumbers="True" 90 | blank () { 91 | DUR="$(xset q | grep Standby | cut -d' ' -f4)" 92 | xset s off 93 | case $DUR in 94 | 7200) xset dpms 600 600 600;notify-send "Display" "Screen blank set to 10 mins.";; 95 | *) xset dpms 7200 7200 7200;notify-send "Display" "Screen blank set to 2 hours.";; 96 | esac 97 | } 98 | }}} 99 | 100 | 101 | == Get current weather + forecast in some sweet output! == 102 | **# Use with **//weather <CITY_NAME>// 103 | {{{code: lang="texinfo" linenumbers="True" 104 | weather () { 105 | curl -4 http://wttr.in/$1 106 | } 107 | }}} 108 | -------------------------------------------------------------------------------- /GPG.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-11-23T00:21:15+01:00 4 | 5 | ====== GPG ====== 6 | Created onsdag 23 november 2016 7 | 8 | **GnuPG is a fork of the Pretty-Good-Privacy standards. ** 9 | 10 | **GPG generates a pair of keys - one public and one private. The public key can be shared and the private key must be kept safe. When someone encrypts a message using your public key, only your private key+password will be able to decrypt the content. ** 11 | 12 | **When signing files it's vice versa. You sign with your private key and others can verify with your public key.** 13 | 14 | **In below examples a document called **//doc//** will be used as example file to encrypt/decrypt.** 15 | 16 | ===== Installation and Setup ===== 17 | **# Install the **//gnupg//** package** 18 | $ pacman -S gnupg 19 | 20 | == Generate key-pair == 21 | $ gpg --full-gen-key 22 | 23 | **# You will be prompted for several questions.** 24 | **# 1: RSA/RSA ** 25 | **# 2: ** 26 | **# 2: 1y - One year expiration date** 27 | **# 3: Name and E-mail. This information will be public** 28 | **# 4: Say **//no//** to comment since it's not well-defined** 29 | **# 5: Password** 30 | 31 | 32 | == List Keys == 33 | **# Public keys** 34 | $ gpg --list-keys 35 | 36 | **# Secret keys** 37 | $ gpg --list-secret-keys 38 | 39 | == Export public key == 40 | **# Will output a public key in ASCII** 41 | $ gpg --output public.key --armor --no-emit-version --export <user-id> 42 | 43 | **# To register your key with a public key-server** 44 | $ gpg --send-keys <key-id> 45 | 46 | == Import public key == 47 | **# In order to encrypt messages to others, you will need their public key. ** 48 | **# To import locally stored keys (downloaded etc)** 49 | $ gpg --import //public.key// 50 | 51 | **# To retrieve information about a key on the keyserver** 52 | $ gpg --search-keys <key-id> 53 | 54 | **# To import keys from the keyserver** 55 | $ gpg --recv-keys <key-id> 56 | 57 | 58 | ===== Signatures ===== 59 | **# Signatures certify and timestamp documents. ** 60 | **#** **If the document is modified, the verification will fail.** 61 | 62 | == Signing files == 63 | **# To sign a file without compressing it into binary - used for text I think** 64 | $ gpg --clearsign doc 65 | 66 | **# To sign and compress into binary format - used with files I think** 67 | $ gpg --output doc.sig --sign doc 68 | 69 | **# To make a detached signature file ** 70 | $ gpg --output doc.sig --detach-sig doc 71 | 72 | == Verify signature == 73 | $ gpg --verify doc.sig 74 | 75 | **# If verifying a detached signature, make sure the signature file and the .iso is located together** 76 | **# Ex.** 77 | $ gpg --verify archlinux-<version>-dual.iso.sig 78 | 79 | 80 | ===== Usage ===== 81 | **# Encrypt / Decrypt ** 82 | 83 | == To Encrypt a message == 84 | **# To encrypt a message, in this example a file called **//doc//**, for a user in your keyring. ** 85 | $ gpg -R <user-id> --no-emit-version -e doc 86 | 87 | **# If you are only encrypting a text message, add **//--armor //**which is suitable for text!** 88 | 89 | == To Decrypt a message == 90 | **# To decrypt a message and output it to a file called **//doc// 91 | $ gpg -o doc -d //file//.pgp 92 | 93 | **# To output the content in **//stdout//** leave out the **//-o doc// 94 | 95 | 96 | ===== Tips and Tricks ===== 97 | **# Some random Tips and Tricks** 98 | 99 | == Edit private key == 100 | **# You can edit your private key through a sub-menu. Change expiration date etc.** 101 | $ gpg --edit-key <user-id> 102 | 103 | == Encrypting own files == 104 | **# You can use your own **//<user-id>//** to encrypt files - only one at the time though. ** 105 | **#** **It is possible to pack various files in a tarball though and then encrypting the entire tarball.** 106 | 107 | == Backup (export) and Import private key == 108 | **# To backup (export) a private key** 109 | $ gpg --export-secret-keys --armor <user-id> > privkey.asc 110 | 111 | **# To import the backup key** 112 | $ gpg --allow-secret-key-import --import privkey.asc 113 | -------------------------------------------------------------------------------- /Gimp.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-19T03:29:28+01:00 4 | 5 | ====== Gimp ====== 6 | Created Sunday 19 February 2017 7 | 8 | **I must admit, that I am a sucker for Photoshop - so we'll try and mimic that the best we can. ** 9 | 10 | == Installation == 11 | $ pacman -S gimp 12 | 13 | 14 | ===== Configuration ===== 15 | **# Run Gimp once to create its configuration/installation folder** 16 | **# Gimps configuration/installation files will be read from **//~/.gimp-2.8// 17 | 18 | == Single window mode == 19 | **# From inside Gimp, go to **//Windows //**> **//Single-Window Mode// 20 | 21 | == Keyboard shortcuts == 22 | **# Download and Overview; **http://epierce.freeshell.org/gimp/gimp_ps.php 23 | **# This file need to override the **//~/.gimp-2.8/menurc //**default file ** 24 | 25 | == Theme == 26 | **# **http://migf1.deviantart.com/art/Clearlooks-Flat-Icons-Gimp-2-8-Themes-v-1-0-1-484289796 27 | **# Download, extract and move the content to a folder in **//~/.gimp-2.8/themes/clearlooks/// 28 | 29 | == Disable layer boundaries == 30 | **# These Blue and Yellow lines outlining the layers.. ** 31 | **# Go to **//Edit//** > **//Preferences//** > **//Image Windows //**> **//Appearance //**and uncheck **//Show Layer Boundary// 32 | **# This needs to be done under both **//Normal//** and **//Fullscreen// 33 | 34 | == Move tool to move the active layer == 35 | **# Make the move tool move the active layer, instead of the object under the mouse.** 36 | **# In Gimp, Select the Move tool. In the bottom of the left toolbar, you have the **//Mode//** options** 37 | **# From there, check the **//Move the active layer// 38 | **# To make it persistent, go to **//Edit //**> **//Preferences//** > **//Tool Options//** and click **//Save Tool Options Now// 39 | 40 | == Snap to canvas edge == 41 | **# Edit **//~/.gimp-2.8/gimprc//** and add the following** 42 | {{{code: lang="texinfo" linenumbers="True" 43 | (default-snap-to-canvas yes) 44 | (default-snap-to-grid yes) 45 | }}} 46 | 47 | 48 | == Smart remove tool == 49 | **# Install the following packet ** 50 | $ yaourt -S gimp-plugin-resynthesizer-git 51 | 52 | **# You can now make your selection, go to **//Filter //**> **//Enhance //**> **//Heal Selection// 53 | 54 | -------------------------------------------------------------------------------- /Gnu_Screen.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-07T08:57:00+01:00 4 | 5 | ====== Gnu Screen ====== 6 | Created onsdag 07 december 2016 7 | 8 | **Gnu Screen allows you to put a wrapper upon a terminal application, given you several features when working in ther terminal** 9 | 10 | == Installation == 11 | $ pacman -S screen 12 | 13 | == Configuration == 14 | **# Create a file, **//~/.screenrc// 15 | 16 | **# To turn off the welcome message, add the following** 17 | {{{code: lang="texinfo" linenumbers="True" 18 | startup_message off 19 | }}} 20 | 21 | 22 | **# To get an informative statusbar** 23 | {{{code: lang="texinfo" linenumbers="True" 24 | hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%n*%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]' 25 | }}} 26 | 27 | 28 | **# To get a scrollbar ** 29 | {{{code: lang="texinfo" linenumbers="True" 30 | termcapinfo xterm* ti@:te@ 31 | }}} 32 | 33 | 34 | 35 | ===== Running ===== 36 | **# You can run with **//screen// 37 | **# Or **//screen -r//** to resume a previous session** 38 | 39 | == Sessions == 40 | **# You can open screen with a unique session name (for multiple screen sessions)** 41 | **# Create named session** 42 | $ screen -S //session_name// 43 | 44 | **# To list your screen sessions** 45 | $ screen -list 46 | 47 | **# To attach to a specific screen session** 48 | $ screen -r //session_name// 49 | 50 | 51 | ===== Usage ===== 52 | **# Use **//ctrl+a //**to open the escape/option. Then use one of the following commands.** 53 | 54 | == Misc == 55 | **# To get help/additional information : **crtl+a **?** 56 | 57 | **# Enter Copy Mode : **crtl+a **Esc** 58 | 59 | **# Paste text : **crtl+a **]** 60 | 61 | == Detaching Screen Session == 62 | **# You can detach the screen/terminal to the background : **crtl+a **d** 63 | 64 | **# To raise a detached screen, re-open it with** 65 | $ screen -r 66 | 67 | == Command prompt == 68 | **# With the command prompt, you can type commands directly ** 69 | **# To open the Command prompt : **crtl+a **:** 70 | 71 | **# Close all windows and the screen session** 72 | **:quit** 73 | 74 | **# Source the screenrc file** 75 | **:source ~/.screenrc** 76 | 77 | **# Rename the session-name ** 78 | **:sessionname **//<NEW_NAME>// 79 | 80 | == Windows == 81 | **# Window list : **crtl+a **"** 82 | 83 | **# Open window 0 etc : **crtl+a **0** 84 | 85 | **# Rename the current Window : **crtl+a **A** 86 | 87 | **# Create a new Window : **crtl+a **c** 88 | 89 | **# Send crtl+a to the current window : **crtl+a **a** 90 | 91 | == Split Window == 92 | **# Split current region into two : **crtl+a **S** 93 | 94 | **# Switch between regions : **crtl+a **tab** 95 | 96 | **# Toggle between current and previous region : **crtl+a **crtl+a** 97 | 98 | **# Close all regions but the current one : **crtl+a **Q** 99 | 100 | **# Close the current region : **crtl+a **X** 101 | -------------------------------------------------------------------------------- /Hardware.txt: -------------------------------------------------------------------------------- 1 | ====== Hardware ====== 2 | Created mandag 31 oktober 2016 3 | 4 | ===== PCI Busses ===== 5 | **# Get a list of connected devices connected through the PCI-bus.** 6 | **# VGA, network adapter, GPU etc.** 7 | $ lspci 8 | 9 | **# You can be more specific/verbose when invoking **//lspci// 10 | $ lspci -v | grep "VGA" 11 | 12 | 13 | ==== Memory ==== 14 | **#** **To see available/used memory ** 15 | $ free -m 16 | 17 | 18 | ==== Battery ==== 19 | **#** **Get the battery capacity/level** 20 | $ cat /sys/class/power_supply/BAT0/capacity 21 | 22 | 23 | ===== Disks ===== 24 | **#** **Human-readable disk size/usage** 25 | $ df -h 26 | 27 | **# Show directory usage** 28 | $ du -sh 29 | 30 | **# All disks and their associated partitions** 31 | $ lsblk -f 32 | 33 | 34 | ===== CPU ===== 35 | **# Pretty well overview of the architecture** 36 | $ lscpu 37 | 38 | 39 | ===== Additional Packages ===== 40 | **# Some addition tools to output Hardware information.** 41 | 42 | == General Hardware Output == 43 | **# **//lshw//** can produce a general detailed overview of devices in your system.** 44 | **# It'll output information about cpu, memory, disks, USB, network etc. ** 45 | $ sudo pacman -S lshw 46 | 47 | **# For a short overview** 48 | $ lshw -short 49 | 50 | == Another - even more detailed - general hardware output == 51 | **# Another tool is **//hwinfo//** which should produce a even more detailed output** 52 | $ pacman -S hwinfo 53 | 54 | **# A short overview** 55 | $ hwinfo --short 56 | 57 | == Hardware information served straight from the BIOS! == 58 | **# **//dmidecode//** reads BIOS based information. ** 59 | **#** **It can, a.a, not only tell you how much ram you have installed-** 60 | **# But also what the maximum amount of ram your system will accept.** 61 | $ pacman -S dmidecode 62 | 63 | **# CPU ** 64 | $ dmidecode -t processor 65 | 66 | **# Memory** 67 | $ dmidecode -t memory 68 | 69 | **# BIOS details (etc etc)** 70 | $ dmidecode -t bios 71 | 72 | 73 | ===== Tips and Tricks ===== 74 | **# Some random Tips and Tricks - additional places to locate information** 75 | 76 | == /proc == 77 | **# Some information can also be found at **///proc// 78 | **# Like CPU information ** 79 | $ cat /proc/cpuinfo 80 | 81 | **# Memory** 82 | $ cat /proc/meminfo 83 | 84 | **# Kernel Information (kinda software, but hey)** 85 | $ cat /proc/version 86 | -------------------------------------------------------------------------------- /Haxor-news.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-09T23:33:20+01:00 4 | 5 | ====== Haxor-news ====== 6 | Created Thursday 09 February 2017 7 | 8 | **Really badass way to get your daily knowledge. ** 9 | 10 | == Installation == 11 | $ yaourt -S haxor-news 12 | 13 | 14 | ===== Usage ===== 15 | **# You'll never again look like a lazy browser - none questions you in the terminal!^** 16 | 17 | == List Posts == 18 | **# There are several of categories to list; **//Top, Best, Show, Ask, Jobs, New//** and **//Onion// 19 | **# Ex, to show the top posts** 20 | $ hn top 21 | 22 | **# Listing post is by default set to 10 posts, unless specified** 23 | **#** **Ex, to show 50 (top) posts** 24 | $ hn top 50 25 | 26 | == Open Post == 27 | **# Once you've found an interesting subject, open it with **//view// 28 | **# Ex, to open post no. 9** 29 | $ hn view 9 30 | 31 | == Comments == 32 | **# You could check if there was any good comment to the post** 33 | **# Ex, for post no. 9 again** 34 | $ hn view 9 -c | less -r 35 | 36 | **# Or to filter most recent comments first** 37 | $ hn view 9 -cr | less -r 38 | 39 | == Hiring and Freelancers == 40 | **# For the monthly hiring posts, you can use Regex Filters** 41 | **# **//(?i) //**= Case Sensitive** 42 | $ hn hiring "(?i)PHP|HTML" 43 | 44 | **# HN also hosts monthly freelancers post and their availabilities - same Regex rules counts here** 45 | $ hn freelancer "(?i)JavaScript|Node" 46 | 47 | == Users == 48 | **# To view user info, ex. for User ID 10** 49 | $ hn user 10 50 | 51 | == Open in Browser == 52 | **# To view the post in your default browser instead, append **//-b// 53 | **# Ex, for post no. 9** 54 | $ hn view 9 -b 55 | -------------------------------------------------------------------------------- /KeePass.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-21T23:40:42+01:00 4 | 5 | ====== KeePass ====== 6 | Created onsdag 21 december 2016 7 | 8 | **KeePass is a local password manager. ** 9 | **Some plugins are available for use with KeePass.** 10 | 11 | == Installation == 12 | $ pacman -S keepass 13 | 14 | == Using with Firefox == 15 | **# **//KeeFox//** is a Firefox plugin (install it via firefox-plugins/browser)** 16 | **# Once installed, the browser will restart and a setup guide is available.** 17 | **# The link in the bottom of this setup guide, will refer you to a .**//plgx//** file - download that!** 18 | 19 | **# Copy the downloaded file into KeePass plugins folder.** 20 | $ cp Downloads/KeePassRPC.plgx /usr/share/keepass/Plugins 21 | 22 | **# Click the **//KeeFox//** plugin icon in Firefox. Select Options.** 23 | **# Under **//KeePass//** set the installed dir** 24 | /usr/share/keepass 25 | 26 | **# Also set the **//Mono Executeable//** (under **//KeePass//**)** 27 | /usr/bin/mono 28 | 29 | **# In **//Advanced//** correct the path to your KeePass db file (.**//kdbx)// 30 | **# Also under **//Advanced//** you can open the **//Message//** options. Disable general messages (piss annoying)** 31 | **# Check of the **//Usage Statistic//**.. Not so keen on sharing anything when it comes to my passwords^** 32 | 33 | 34 | ===== Troubleshoot ===== 35 | **# Some issues I've found along the way** 36 | 37 | == i3 Crash Issue == 38 | **# The **//i3//** VM and **//KeePass//** works - well not so well together. ** 39 | **# Edit **///usr/bin/keepass //**and add **//--verify-all //**to the string** 40 | {{{code: lang="texinfo" linenumbers="True" 41 | #!/bin/sh 42 | exec mono --verify-all /usr/share/keepass/KeePass.exe "$@" 43 | }}} 44 | 45 | 46 | -------------------------------------------------------------------------------- /Kernel_Modules.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-12T04:17:37+01:00 4 | 5 | ====== Kernel Modules ====== 6 | Created Sunday 12 February 2017 7 | 8 | **Kernel modules are snippets of code that can be loaded/unloaded on demand. They extend functionality for the Kernel without the need to reboot.** 9 | 10 | == Obtaining information == 11 | **# Modules are stored in **///usr/lib/modules/<KERNEL_RELEASE>/// 12 | **# You can get the Kernel Release with; **//uname -r// 13 | 14 | **# Currently loaded modules** 15 | $ lsmod 16 | 17 | **# Show information about a module ** 18 | $ modinfo //<MODULE_NAME>// 19 | 20 | **# Show options set for a loaded module** 21 | $ systool -v -m //<MODULE_NAME>// 22 | 23 | **# Show configuration for a specific module** 24 | $ modprobe -c | grep //<MODULE_NAME>// 25 | 26 | **# Show comprehensive configuration for all modules** 27 | $ modprobe -c | less 28 | 29 | == Manual handling == 30 | **# If you've updated the kernel and not yet rebooted, **//modprobe//** will not work!** 31 | **# This will take immediate effect. No reboot required. ** 32 | 33 | **# Load a module** 34 | $ modprobe //<MODULE_NAME>// 35 | 36 | **# Unload module** 37 | $ modprobe -r //<MODULE_NAME>// 38 | 39 | **# Set options (**//key=value//**)** 40 | $ modprobe //<MODULE_NAME> <PARAMETER>=<VALUE>// 41 | 42 | == Load module at boot == 43 | **# Modules can be enabled by storing the module name in a configuration file in **///etc/modules-load.d/// 44 | **# The configuration file needs to be named the same as the module, ending with **//.conf// 45 | **# So if we f.ex. wanted to load **//virtio-net//**, create a file **///etc/modules-load.d/virtio-net.conf// 46 | {{{code: lang="texinfo" linenumbers="True" 47 | # Load virtio-net.ko at boot 48 | virtio-net 49 | }}} 50 | 51 | 52 | == Configure module at boot == 53 | **# Configurations can be stored in **///etc/modprobe.d/ //**and needs to end with **//.conf //**(name optional)** 54 | **# The syntax goes as; **//options <MODULE_NAME> <PARAMETER>=<VALUE>// 55 | 56 | **# Ex. for a Thinkpad fan (**//key=value//**); **///etc/modprobe.d/thinkfan.conf// 57 | {{{code: lang="texinfo" linenumbers="True" 58 | options thinkpad_acpi fan_control=1 59 | }}} 60 | 61 | 62 | == Blacklist module at boot == 63 | **# Create/edit **///etc/modprobe.d/blacklist.conf// 64 | **# Modules may be added in a line separated fashion** 65 | **# It should be better to blacklist modules with; **//install <MODULE_NAME> /bin/false// 66 | **# Ex, to disable the speaker-beep** 67 | {{{code: lang="texinfo" linenumbers="True" 68 | install pcspkr /bin/false 69 | }}} 70 | 71 | 72 | == Tainted kernel == 73 | **# Check if any modules are tainting the kernel** 74 | $ cat /proc/sys/kernel/tainted 75 | 76 | **# If the value is anything than **//0//** something is tainting the kernel** 77 | **# Check what is tainting the kernel ** 78 | $ dmesg | grep -i taint 79 | 80 | -------------------------------------------------------------------------------- /Kernels.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-27T21:47:12+02:00 4 | 5 | ====== Kernels ====== 6 | Created torsdag 27 oktober 2016 7 | 8 | **We'll install two Kernels - the Zen kernel, which is a good all' round desktop kernel, and the Long Time Support (lts) kernel in case we should ever get a Kernel panic. ** 9 | 10 | == Installation == 11 | **# Both kernels comes from the official repository ** 12 | $ pacman -S linux-zen linux-lts 13 | 14 | ===== Grub Configuration ===== 15 | **# Edit the Grub configuration in **///etc/default/grub // 16 | **# We'll add a parameter and disable the sub-tree feature.** 17 | 18 | **#** **Kernel parameters can be added to the** //GRUB_CMDLINE_LINUX_DEFAULT=// 19 | **Ex.** //GRUB_CMDLINE_LINUX_DEFAULT="quiet splash //parameter1 parameter2//"// 20 | 21 | == I/O Scheduler == 22 | **#** **Enable the BFQ scheduler** 23 | {{{code: lang="texinfo" linenumbers="True" 24 | GRUB_CMDLINE_LINUX_DEFAULT="elevator=bfq" 25 | }}} 26 | 27 | 28 | == Disable Sub-tree == 29 | **# Grub, by default, groups the **//linux//** and **//linux-lts//** kernel in a category tree (subcategory).** 30 | **# To disable this, add the following to the Grub configuration** 31 | {{{code: lang="texinfo" linenumbers="True" 32 | GRUB_DISABLE_SUBMENU=y 33 | }}} 34 | 35 | 36 | == Update Grub == 37 | **# Regenerate the configuration file for the above settings to take affect** 38 | $ grub-mkconfig -o /boot/grub/grub.cfg 39 | 40 | 41 | ==== Remove old kernels ==== 42 | **#** **Reboot and check if everything works okay. If so, it is safe to remove** //linux //**and**// linux-headers// 43 | 44 | 45 | -------------------------------------------------------------------------------- /Keys.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-11-22T23:38:53+01:00 4 | 5 | ====== Keys ====== 6 | Created tirsdag 22 november 2016 7 | 8 | **SSH Keys are used instead of passwords - a fast authentication. ** 9 | 10 | == A quick info == 11 | **SSH keys are generated in pairs - one public and one private. Share the public key all you want, but safeguard the private key. ** 12 | 13 | **The public key is then used to encrypt a message - the public key is NOT able to decrypt this very same message - so the trick is, that the public key gives you an **encrypted** message which only the private key-holder will be able to give the appropriate responds to. ** 14 | 15 | == Storage == 16 | **#** **The keys is by default stored in **//~/.ssh/// 17 | **#** **The public key will be the one with the **//.pub //**suffix** 18 | 19 | == Generate a pair of SSH keys == 20 | **# We append **//-C//** to add a comment. In this case the user, host and date is used for easy verification** 21 | $ ssh-keygen -C "$(whoami)@$(hostname)-$(date -I)" 22 | 23 | **# You will be prompted where to store the private key - leave this option to default (**//~/.ssh///**)** 24 | **# Choose a strong Password** 25 | 26 | == Change Password on a private key - without changing the key itself == 27 | $ ssh-keygen -f ~/.ssh///key-id// -p 28 | 29 | == Copy public key to remote server == 30 | **# If the SSH server does not run on port 22, append the **//-p <PORT_NUMBER>// 31 | $ ssh-copy-id -i ~/.ssh///key_id//.pub username@remote-server.org 32 | -------------------------------------------------------------------------------- /LAMP.txt: -------------------------------------------------------------------------------- 1 | ====== LAMP ====== 2 | Created Tuesday 10 January 2017 3 | 4 | **This is a setup guide for the **//Linux Apache MySQL PHP//** development environment (web-development)** 5 | 6 | **# Once below installation steps has been followed, you can enter you web-directory from the browser** 7 | //localhost //**# Your web-directory** 8 | localhost/adminer **# Database management** 9 | 10 | 11 | ===== Apache ===== 12 | **# Install the package** 13 | $ pacman -S apache 14 | 15 | **# And enable/start the service** 16 | **# For every configuration you make, the service has to be restarted before the changes take affect.** 17 | $ systemctl enable httpd.service 18 | 19 | **# In order for Apache to read your web-directory, a few permissions has to be changed** 20 | $ chmod o+x ~ 21 | $ chmod o+rx ~/Dropbox 22 | 23 | ==== Configuration ==== 24 | **# Apaches configuration files can be found at **///etc/httpd/conf/httpd.conf // 25 | 26 | == Limit access only from local machine == 27 | **# Change **//Listen 80//** to your localhost** 28 | {{{code: lang="texinfo" linenumbers="True" 29 | Listen 127.0.0.1:80 30 | }}} 31 | 32 | 33 | == Change directory == 34 | **# Change to the location where you store all your web-projects. Mine would be **//~/Dropbox/www// 35 | {{{code: lang="texinfo" linenumbers="True" 36 | DocumentRoot "/home/stick/Dropbox/www" 37 | <Directory "/home/stick/Dropbox/www"> 38 | }}} 39 | 40 | 41 | == Setup to use PHP == 42 | **# One line needs to be commented out and another needs to be uncommented - as shown ** 43 | {{{code: lang="texinfo" linenumbers="True" 44 | #LoadModule mpm_event_module modules/mod_mpm_event.so 45 | LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 46 | }}} 47 | 48 | 49 | **# This needs to go AFTER **//LoadModule dir_module modules/mod_dir.so// 50 | {{{code: lang="texinfo" linenumbers="True" 51 | LoadModule php7_module modules/libphp7.so 52 | }}} 53 | 54 | 55 | **# This goes at the END of the **//include//** list** 56 | {{{code: lang="texinfo" linenumbers="True" 57 | Include conf/extra/php7_module.conf 58 | }}} 59 | 60 | 61 | **# This goes at the END in **//LoadModule// 62 | {{{code: lang="texinfo" linenumbers="True" 63 | AddHandler php7-script php 64 | }}} 65 | 66 | 67 | == Setup to use MySQL == 68 | **# Add this line to enable **//adminer //**- which will be our front-end for administrating our databases** 69 | {{{code: lang="texinfo" linenumbers="True" 70 | Include conf/extra/httpd-adminer.conf 71 | }}} 72 | 73 | 74 | == A few security measures == 75 | **# This is from a separate configuration file found in **///etc/httpd/conf/extra/httpd-default.conf// 76 | **# Turn off **//ServerSignature//** and hide additional information with **//ServerTokens// 77 | {{{code: lang="texinfo" linenumbers="True" 78 | ServerSignature Off 79 | ServerTokens Prod 80 | }}} 81 | 82 | 83 | 84 | ===== PHP ===== 85 | **# Install these two packages ** 86 | $ pacman -S php php-apache 87 | 88 | ==== Configuration ==== 89 | **# The PHP configuration files can be found at **///etc/php/php.ini// 90 | 91 | == Change the Timezone == 92 | **# Edit and uncomment the Timezone line** 93 | {{{code: lang="texinfo" linenumbers="True" 94 | date.timezone = Europe/Copenhagen 95 | }}} 96 | 97 | 98 | == Turn on Errors == 99 | **# Edit the **//error_reporting//** line and turn on errors in the display_errors line** 100 | {{{code: lang="texinfo" linenumbers="True" 101 | error_reporting = E_ALL 102 | display_errors=On 103 | }}} 104 | 105 | 106 | == Setup to use MySQL == 107 | **# Uncomment the following two lines** 108 | {{{code: lang="texinfo" linenumbers="True" 109 | extension=pdo_mysql.so 110 | extension=mysqli.so 111 | }}} 112 | 113 | 114 | 115 | ===== MySQL ===== 116 | **# We'll use mariadb ** 117 | $ pacman -S mariadb 118 | 119 | **# Our front-end to administrate our databases ** 120 | $ yaourt -S adminer 121 | 122 | ==== Configuration ==== 123 | **# This needs to be run BEFORE enabling/starting the service file** 124 | $ mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql 125 | 126 | **# Then enable and start the mariadb service file** 127 | $ systemctl enable mariadb.service 128 | $ systemctl start mariadb.service 129 | 130 | **# And run the Setup Wizard AS ROOT! - follow the few steps. Basically just yes to it all^** 131 | $ sudo mysql_secure_installation 132 | 133 | **# The remaining configuration is done in **///etc/mysql/my.cnf// 134 | 135 | == Only allow local access == 136 | **# Uncomment **//skip-networking //**and** **leave **//Port//** blank in both **//[client]//** and **//[mysqld]// 137 | {{{code: lang="texinfo" linenumbers="True" 138 | [client] 139 | Port = 140 | 141 | [mysqld] 142 | Port = 143 | 144 | skip-networking 145 | }}} 146 | 147 | 148 | == Use UTF-8 == 149 | **# Add these lines to the **//[mysqld]//** group** 150 | {{{code: lang="texinfo" linenumbers="True" 151 | [mysqld] 152 | init_connect = 'SET collation_connection = utf8_general_ci,NAMES utf8' 153 | collation_server = utf8_general_ci 154 | character_set_client = utf8 155 | character_set_server = utf8 156 | }}} 157 | 158 | 159 | 160 | ===== Tips and Tricks ===== 161 | **# A couple of additions** 162 | 163 | == Imagick == 164 | **# For the imagick features - which have a nice collection of features - install the following package from the AUR** 165 | $ cower -d php-imagick 166 | $ cowup 167 | 168 | **# Then add the following line to the **//extensions //**section in the **///etc/php/php.ini //**file** 169 | {{{code: lang="texinfo" linenumbers="True" 170 | extension=imagick.so 171 | }}} 172 | -------------------------------------------------------------------------------- /Laptop.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T20:14:39+02:00 4 | 5 | ====== Laptop ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **Some useful Laptop tools for power management ex.** 9 | 10 | ===== TLP ===== 11 | **# Advanced power management, not much setup is required** 12 | $ pacman -S tlp 13 | 14 | **# Enable its two services ** 15 | $ systemctl enable tlp.service 16 | $ systemctl enable tlp-sleep.service 17 | 18 | **# And disable **//rfkill// 19 | $ systemctl disable systemd-rfkill.service 20 | 21 | == Usage == 22 | **# Status report with configuration and active settings** 23 | $ tlp-stat 24 | 25 | **# Verbose information** 26 | $ tlp-stat -v 27 | 28 | **# Show warnings** 29 | $ tlp-stat -w 30 | 31 | **# Battery information** 32 | $ tlp-stat -b 33 | 34 | **# Disk data** 35 | $ tlp-stat -d 36 | 37 | **# USB devices** 38 | $ tlp-stat -u 39 | 40 | **# PCI devices** 41 | $ tlp-stat -e 42 | 43 | **# CPU data** 44 | $ tlp-stat -p 45 | 46 | **# Temperature** 47 | $ tlp-stat -t 48 | 49 | **# Radio devices (wifi, bluetooth etc)** 50 | $ tlp-stat -r 51 | 52 | **# System information (bios & system a.a.)** 53 | $ tlp-stat -s 54 | 55 | == Configuration == 56 | **# **//TLP//** keeps all its configuration in **///etc/default/tlp// 57 | 58 | **# Disk I/O Scheduler** 59 | **# Using the Zen-kernel, the **//bfq//** scheduler is preferred** 60 | **# Search for **//DISK_IOSCHED=//** outcomment and change its value to **//bfq cfq// 61 | {{{code: lang="texinfo" linenumbers="True" 62 | DISK_IOSCHED="bfq cfq" 63 | }}} 64 | 65 | 66 | 67 | ===== Powertop ===== 68 | **# **//Powertop//** is a intel tool that can help us with power suggestion,** 69 | **# system information** **and show apps with high power consumption.** 70 | $ pacman -S powertop 71 | 72 | **# To get a report** 73 | $ powertop --html=powerreport.html 74 | 75 | **# This will create a **//powerreport.html//** file, open this and examine the suggestions etc.** 76 | 77 | 78 | ===== Disable Power/Suspend/Hibernate Buttons ===== 79 | **# Systemd can handle the ACPI events ** 80 | **# Edit **///etc/systemd/logind.conf// 81 | **# Outcomment and define **//ignore//** to these 4 events (power, hibernation, suspend and lid-close)** 82 | {{{code: lang="texinfo" linenumbers="True" 83 | HandlePowerKey=ignore 84 | HandleSuspendKey=ignore 85 | HandleHibernateKey=ignore 86 | HandleLidSwitch=ignore 87 | }}} 88 | 89 | 90 | **# Changes will take affect after next reboot** 91 | -------------------------------------------------------------------------------- /LibreOffice.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-04T14:34:32+01:00 4 | 5 | ====== LibreOffice ====== 6 | Created søndag 04 december 2016 7 | 8 | **LibreOffice is one of the OpenSource office suites that can be used instead of the evil Microsoft office.** 9 | 10 | == Installation == 11 | $ pacman -S libreoffice 12 | 13 | == Spell checking == 14 | **# Install the following two packages, for English and Danish language support** 15 | $ pacman -S hunspell-en 16 | $ yaourt -S hunspell-da 17 | 18 | **# (**//hunspell-da//**, by the time of writing this, has a pkg-build error)** 19 | **# If you still encounter an error, two items needs to be changed in the pkg-build. ** 20 | **# Yaourt will ask if you want to edit pkg-build. Unless you've asked it not to of course (.yaourtrc)** 21 | **# Accept this Edit and change **//arch//** and **//source //**variables to the following. ** 22 | **# (You might have to check and see if the source link is still correct. It is of the time writing this)** 23 | {{{code: lang="texinfo" linenumbers="True" 24 | arch=('any') 25 | source=(https://extensions.libreoffice.org/extensions/stavekontrolden-danish-dictionary/2.3/@@download/file/dict-da-2-3.oxt) 26 | }}} 27 | 28 | 29 | == Configuration == 30 | **# Open LibreOffice and navigate to **//Tools > Options// 31 | 32 | **# Under **//Memory// 33 | **# Set** Use for LibreOffice **(GPU) to** //128MB// 34 | **# Set** Memory Per Object **to** //20MB// 35 | 36 | **# Under **//Advanced// 37 | **#** **Uncheck** Use a Java Runtime Environment 38 | 39 | 40 | ===== Tips and Tricks ===== 41 | **# Some random Tips and Tricks** 42 | 43 | == Disable the startup logo == 44 | **# Edit **///etc/libreoffice/sofficerc //**find and change **//Logo=// 45 | {{{code: lang="texinfo" linenumbers="True" 46 | Logo=0 47 | }}} 48 | 49 | 50 | -------------------------------------------------------------------------------- /Login.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-10T18:31:34+01:00 4 | 5 | ====== Login ====== 6 | Created None 7 | 8 | **Haven't found any perks by using a Display Manager. ** 9 | **With my setup **//.xinitrc//** is being run on logon anyways, and haven't found a DM that I like.** 10 | 11 | == /etc/issue == 12 | **# **///etc/issue//** will be prompted before the **//Username//** & **//Password//** request in tty** 13 | **# Place a nice little welcome message in that file. This one f.ex.^** 14 | {{{code: lang="texinfo" linenumbers="True" 15 | _ __ __ ___ ___ __ _ __ 16 | | '__/ _` \ \ /\ / / '__| '__| 17 | | | | (_| |\ V V /| | | | 18 | |_| \__,_| \_/\_/ |_| |_| 19 | 20 | ============================== 21 | 22 | Welcome Master 23 | Please provide your credentials 24 | 25 | System.......: Arch Linux \r 26 | Date.........: \d \t 27 | On...........: \l 28 | Hostname.....: \n 29 | 30 | ============================== 31 | 32 | }}} 33 | 34 | 35 | 36 | **# Escape Codes** 37 | **# As the above shows, you can use Escape Code (**//\d ex//**)** 38 | **# These are the Escape Codes there is available** 39 | 40 | \b **Insert the baudrate of the current line.** 41 | \d **Insert the current date.** 42 | \s **Insert the system name, the name of the operating system.** 43 | \l **Insert the name of the current tty line.** 44 | \m **Insert the architecture identifier of the machine, e.g., i486** 45 | \n **Insert the nodename of the machine, also known as the hostname.** 46 | \o **Insert the domainname of the machine.** 47 | \r **Insert the release number of the kernel, e.g., 2.4.16.** 48 | \t **Insert the current time.** 49 | \u **Insert the number of current users logged in.** 50 | \U **Insert the string "1 user" or "<n> users" where <n> is the** 51 | **number of current users logged in.** 52 | \v **Insert the version of the OS, e.g., the build-date etc.** 53 | 54 | 55 | ===== Tips and Tricks ===== 56 | **# Just a few^** 57 | 58 | == Auto login == 59 | **# To have your system skip the tty login, and open your Xorg/WM session upon boot** 60 | **# This will start a user sessions along with the Xorg Display Server.** 61 | $ yaourt -S xlogin-git 62 | 63 | **# Then Enable the service file (SUDO!)** 64 | $ systemctl enable xlogin@stick 65 | -------------------------------------------------------------------------------- /Mimeo.txt: -------------------------------------------------------------------------------- 1 | ====== Mimeo ====== 2 | Created søndag 04 december 2016 3 | 4 | //Xdg-utils//** does not work without a Desktop Environment. We'll be using a tool that makes **//xdg-open//** fall back to something working with just a Window Manager - **//mimeo//**. ** 5 | 6 | == Installation == 7 | **# NOTE! I had to skip the PGP check, but this might have changed** 8 | $ yaourt --m-arg --skippgpcheck -Sb xdg-utils-mimeo 9 | 10 | **# You might have to import their GPG key** 11 | $ gpg --recv-keys --keyserver hkp://pgp.mit.edu 1D1F0DC78F173680 12 | 13 | == Get mime-type == 14 | **# Ex, to determine filetype for a file called **//photo.jpg// 15 | $ mimeo -m photo.jpg 16 | 17 | **# Should return something like **//image/jpeg// 18 | 19 | == Get default application for mime-type == 20 | **# You can either point to a file** 21 | $ mimeo -d photo.jpg 22 | 23 | **# Or the mime-type** 24 | $ mimeo -d image/jpeg 25 | 26 | == Change default application == 27 | **# The default applications to choose from can be found in **///usr/share/applications/// 28 | **# To change the default application for a mime-type** 29 | $ mimeo --add image/jpeg feh.desktop 30 | 31 | == Open Application == 32 | **# You can open a item with your default application** 33 | $ mimeo photo.jpg 34 | 35 | == A little to get you started^ == 36 | **# Images; Feh/jpg/png/gif** 37 | $ mimeo --add image/jpeg feh.desktop 38 | $ mimeo --add image/png feh.desktop 39 | $ mimeo --add image/gif feh.desktop 40 | 41 | **# Video; Mplayer/ogg/mp4/webm** 42 | $ mimeo --add video/ogg mplayer.desktop 43 | $ mimeo --add video/mp4 mplayer.desktop 44 | $ mimeo --add video/webm mplayer.desktop 45 | 46 | 47 | **# Text; Gvim/plain, Mupdf/pdf** 48 | $ mimeo --add text/plain gvim.desktop 49 | $ mimeo --add application/pdf mupdf.desktop 50 | 51 | **# Devel; Sublime/html/php/css/javascript/markdown** 52 | $ mimeo --add text/html sublime_text_3.desktop 53 | $ mimeo --add application/x-php sublime_text_3.desktop 54 | $ mimeo --add text/css sublime_text_3.desktop 55 | $ mimeo --add application/javascript sublime_text_3.desktop 56 | $ mimeo --add text/markdown sublime_text_3.desktop 57 | -------------------------------------------------------------------------------- /Mirrors.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T21:44:58+02:00 4 | 5 | ====== Mirrors ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | ==== Use European servers ==== 9 | **# Edit the **///etc/pacman.conf//** file. Add the following server lines before the include lines.** 10 | {{{code: lang="texinfo" linenumbers="True" 11 | [core] 12 | Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch 13 | Include = /etc/pacman.d/mirrorlist 14 | 15 | [extra] 16 | Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/extra/os/$arch 17 | Include = /etc/pacman.d/mirrorlist 18 | 19 | [community] 20 | Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/community/os/$arch 21 | Include = /etc/pacman.d/mirrorlist 22 | }}} 23 | 24 | 25 | 26 | ==== Using Reflector ==== 27 | **# Reflector is a package that retrieve the latest mirror list, filter the most up-to-date -** 28 | **# sort them by speed and overwrite the **///etc/pacman.d/mirrorlist//**.** 29 | $ pacman -S reflector 30 | 31 | **#** **To rate and update the mirrorlist** 32 | $ reflector --verbose -l 30 --number 20 -p https --sort rate --save /etc/pacman.d/mirrorlist 33 | 34 | == Automatic update mirrorlist when a new is installed (.pacnew) == 35 | **# You can create a pacman hook to run reflector everytime pacman-mirrorlist gets an upgrade.** 36 | **# Create a new hook** ///etc/pacman.d/hooks/mirrorupgrade.hook// 37 | {{{code: lang="texinfo" linenumbers="True" 38 | [Trigger] 39 | Operation = Upgrade 40 | Type = Package 41 | Target = pacman-mirrorlist 42 | 43 | [Action] 44 | Description = Updating pacman-mirrorlist with reflector and removing pacnew... 45 | When = PostTransaction 46 | Depends = reflector 47 | Exec = /usr/bin/env sh -c "reflector --verbose -l 30 --number 20 --age 24 --sort rate --save /etc/pacman.d/mirrorlist; if [[ -f /etc/pacman.d/mirrorlist.pacnew ]]; then rm /etc/pacman.d/mirrorlist.pacnew; fi" 48 | }}} 49 | 50 | 51 | -------------------------------------------------------------------------------- /MonoDevelopment.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-27T16:15:59+01:00 4 | 5 | ====== MonoDevelopment ====== 6 | Created Monday 27 February 2017 7 | 8 | **I cry a little every time I fire up Windows, so being able to do some small basic C# in Linux will be nice.** 9 | 10 | == Installation == 11 | **# We'll need a couple of packages for the framework and the IDE** 12 | $ pacman -S mono mono-basic monodevelop mono-tools 13 | 14 | **# Mono calls Xterm when you run projects - install it for your Console Applications** 15 | $ pacman -S xterm 16 | 17 | 18 | == Running applications == 19 | **# Again, limited to the Console Applications I'm quite sure** 20 | $ mono ///path/to/exe/file// 21 | -------------------------------------------------------------------------------- /Network.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-04T20:01:55+01:00 4 | 5 | ====== Network ====== 6 | Created søndag 04 december 2016 7 | 8 | == System == 9 | **#** **Get network device names** 10 | $ iw dev 11 | 12 | **#** **Network status ** 13 | $ iw dev wlp2s0 link 14 | 15 | **#** **Intern Address and routing point ** 16 | $ ip addr 17 | 18 | == Domain/ Host == 19 | **# See if host is up** 20 | $ ping <HOST> 21 | 22 | **# Whois for Domain** 23 | $ whois <DOMAIN> 24 | 25 | **# DNS for Domain** 26 | $ dig <DOMAIN> 27 | 28 | **# Reverse lookup host** 29 | $ dig -x <HOST> 30 | 31 | ===== SS network tool ===== 32 | **# **//ss//** replaces the **//netstat //**tool** 33 | 34 | == Analysis example == 35 | **# To list all open ports ( **//-l //**) and what process using the socket ( **//-p //**)** 36 | $ ss -pl 37 | 38 | **# You can be more specific with **//|grep// 39 | **#** **Ex. if we'd like to know what is using port **//4949// 40 | $ ss -pl |grep 4949 41 | 42 | **# You might get a result with something like the following ** 43 | users:(("dleyna-renderer",pid=14620,fd=12)) 44 | 45 | **# Now we can use the **//pid=14620//** to get more information about that process** 46 | $ cd /proc/14620 47 | $ ls -l 48 | 49 | == Basic Usage == 50 | **# List all TCP sockets** 51 | $ ss -ta 52 | 53 | **# List all UDP sockets ** 54 | $ ss -ua 55 | 56 | **# List all RAW sockets** 57 | $ ss -wa 58 | 59 | **# List all UNIX sockets** 60 | $ ss -xa 61 | 62 | == Filtering sockets == 63 | **# IPv4 ( **//-4 //**) ** 64 | $ ss -4 state //<state>// 65 | 66 | **# IPv6 ( **//-6 //**)** 67 | $ ss -6 state //<state>// 68 | 69 | **# **//<state>//** can be one of the following** 70 | established 71 | syn-sent 72 | syn-recv 73 | fin-wait-1 74 | fin-wait-2 75 | time-wait 76 | closed 77 | close-wait 78 | last-ack 79 | listen 80 | closing 81 | all **# All of the above states** 82 | connected **# All the states except for listen and closed** 83 | synchronized **# All the connected states except for syn-sent** 84 | bucket **# Show states, which are maintained as minisockets, i.e. time-wait and syn-recv.** 85 | big **# Opposite to bucket state.** 86 | 87 | **# Show all connected ports to destionation (**//dst//**), ex** 88 | $ ss dst 123.1.2.100 89 | 90 | **# To show all IPs connected to your local machine** 91 | **# Get your **//<localaddress>//** with **//ip addr// 92 | $ ss src //<localaddress>// 93 | -------------------------------------------------------------------------------- /PSD_and_ASD.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-03T12:33:19+01:00 4 | 5 | ====== PSD and ASD ====== 6 | Created lørdag 03 december 2016 7 | 8 | **PSD will sync browser profiles to memory - thus speeding up browser responsiveness and reduces wear down on the drive. PSD does not take in account, that the major browsers caches are separate from their profile foler. Therefore we use ASD to sync that folder.** 9 | 10 | ===== Installation ===== 11 | **# Install both PSD and ASD from the AUR** 12 | $ yaourt -S profile-sync-daemon anything-sync-daemon 13 | 14 | ===== Profile Sync Daemon ===== 15 | **# RUN psd once to create a initial config file** 16 | $ psd 17 | 18 | **#** **PSD has its configuration file in **//~/.config/psd/psd.conf// 19 | **# In this configuration file, define your browser - you can add more browser (space seperated list)** 20 | **# Uncomment and set to **//yes//** in the **//USE_OVERLAYFS//** variable - NOTE: the overlayfs point below.** 21 | 22 | == OVERLAYFS == 23 | **# Overlayfs will reduce the memory footprint by only syncing what has changed.** 24 | **#** **Where the default is to sync the whole profile. ** 25 | 26 | **# In order for this to work though, you need some sudo rights. Edit your **//sudoer//** file** 27 | $ sudo visudo 28 | 29 | **# And add this line ** 30 | {{{code: lang="texinfo" linenumbers="True" 31 | foo ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper 32 | }}} 33 | 34 | 35 | == Enable the service == 36 | $ systemctl --user enable psd.service 37 | 38 | == Usage == 39 | **# You can get a informative parse with** 40 | $ psd p 41 | 42 | **# To remove the recovery snapshots** 43 | $ psd c 44 | 45 | 46 | ===== Anything Sync Daemon ===== 47 | **# The configuration file is stored in **///etc/asd.conf // 48 | **#** **Add you browsers cache folder to the **//WHATTOSYNC //**variable.** 49 | **# You browsers cache can be found in **//~/.cache/<browserChoice>/<profileName> //**or something like that.** 50 | **# Ex. ** 51 | {{{code: lang="texinfo" linenumbers="True" 52 | WHATTOSYNC=('/home/stick/.cache/mozilla/firefox/tta26zga.default') 53 | }}} 54 | 55 | 56 | **# Outcomment and add **///dev/shm//** (recommended on arch-wiki) to the **//VOLATILE //**variable** 57 | **# This is recommended since software like BleachBit clears files in **///tmp//** - so **///dev/shm//** is preferred** 58 | {{{code: lang="texinfo" linenumbers="True" 59 | VOLATILE="/dev/shm" 60 | }}} 61 | 62 | 63 | **# Uncomment and set to **//yes//** in the **//USE_OVERLAYFS//** variable and modprobe **//overlay// 64 | $ modprobe overlay 65 | 66 | == Enable the service == 67 | $ systemctl enable asd.service 68 | 69 | == Usage == 70 | **# Works like PSD. To get information** 71 | $ asd p 72 | 73 | **# To clean the recovery snapshots** 74 | $ asd c 75 | -------------------------------------------------------------------------------- /Pacnew_and_Pacsave.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T21:27:08+02:00 4 | 5 | ====== Pacnew and Pacsave ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | **When pacman removes a files it stores the packages configuration files with a **//.pacsave//** extension. ** 9 | **Likewise when pacman upgrades a package and a configuration files differs, it stores the new configuration file with the **//.pacnew//** extension.** 10 | 11 | == Locate .pac* files == 12 | **# Make sure you have the **//mlocate//** package for this. Update locates database with** //updatedb//. 13 | $ locate --existing --regex "\.pac(new|save)$" 14 | 15 | -------------------------------------------------------------------------------- /Permissions.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T17:31:52+02:00 4 | 5 | ====== Permissions ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | **#** **To change permissions of a file/folder, use** //chmod// 9 | $ chmod //who=<PERMISSIONS> <FILE_NAME>// 10 | 11 | **#** **Who ** 12 | u **= user that owns the file** 13 | g **= group the file belongs to** 14 | o **= other users (everyone else)** 15 | a **= all of the above (use instead of ugo)** 16 | 17 | **#** **Permissions ** 18 | r **= read access** 19 | w **= write access** 20 | x **= execute-able** 21 | 22 | 23 | == Basic Examples == 24 | $ chmod og=rx ~/Documents **# owner and group gets read and execute access** 25 | $ chmod g= ~/Documents **# no access for group (empty space means no access)** 26 | 27 | **#** **You'll sometimes see numeric given permissions** 28 | r = 4 w = 2 x = 1 29 | 30 | **#** **So as an example, we could say ** 31 | [owner] : rwx = 4+2+1 = 7 32 | [group] : r-x = 4+0+1 = 5 33 | [other] : r-x = 4+0+1 = 5 34 | 35 | **# Would be produced as** 36 | $ chmod 755 //<FILE_NAME>// 37 | 38 | == Bulk chmod == 39 | # **chmod directories to 755** //-type d// **for directory** 40 | $ find //directory// -type d -exec chmod 755 {} + 41 | 42 | **#** **chmod files to 644 **//-type f// **for files** 43 | $ find //directory// -type f -exec chmod 644 {} + 44 | 45 | == Change ownership == 46 | **# Let's say we have a folder owned by **//root//** - maybe we created a new partition with **//gparted//** ex.** 47 | $ chown //username// /path/to/folder 48 | -------------------------------------------------------------------------------- /Pulseaudio.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-28T19:47:04+01:00 4 | 5 | ====== Pulseaudio ====== 6 | Created onsdag 28 december 2016 7 | 8 | **Getting Alsa to play over bluetooth proved tricky - and the management/control was terrible. ** 9 | **The sound works out-the-box with **//PulseAudio//** and it made bluetooth output a lot easier.** 10 | 11 | 12 | == Alsa default device == 13 | **# By default alsa doesn't detect the correct device for me. ** 14 | **# To correct this, create/edit **///etc/modprobe.d/modprobe.conf// 15 | **# And add the following line. A reboot is required before it'll take effect.** 16 | {{{code: lang="texinfo" linenumbers="True" 17 | options snd_hda_intel index=1 18 | }}} 19 | 20 | 21 | 22 | ===== PulseAudio ===== 23 | **# **//PulseAudio//** is the sound server that will manage our sound through Alsa. ** 24 | 25 | == Installation == 26 | $ pacman -S pulseaudio pulseaudio-alsa lib32-libpulse lib32-alsa-plugins 27 | 28 | == Volume Controls == 29 | **# CLI Curses controls** 30 | $ cower -d pulsemixer 31 | 32 | **# And if you are in the mood for a GUI tool^** 33 | $ pacman -S pavucontrol 34 | 35 | == Pulseaudio-ctl == 36 | **# Get CLI controls as well (used for multimedia keys)** 37 | $ yaourt -S pulseaudio-ctl 38 | 39 | **# Control with; ** 40 | pulseaudio-ctl mute **# Toggle status of mute** 41 | pulseaudio-ctl mute-input **# Toggle status of mute for mic** 42 | pulseaudio-ctl up **# Increase vol by 5 %** 43 | pulseaudio-ctl up 25 **# Increase vol by 25 %** 44 | pulseaudio-ctl down **# Decrease vol by 5 %** 45 | pulseaudio-ctl down 50 **# Decrease vol by 50 %** 46 | pulseaudio-ctl set 40 **# Set vol to 40%** 47 | pulseaudio-ctl atmost 30 **# Set vol to 30% if current higher than that** 48 | 49 | 50 | 51 | ===== Bluetooth Speaker ===== 52 | **# This requires you've to have been through **bluetooth**.** 53 | 54 | == Installation == 55 | $ pacman -S pulseaudio-bluetooth bluez-libs bluez-firmware 56 | 57 | == Usage == 58 | **# Connect to the device as explained in **bluetooth**.** 59 | **# You should now be able to select the output through **//pavucontrol//**.** 60 | 61 | == Tips and Tricks == 62 | **# To autoconnect when starting the **//bluetooth.service// 63 | **# First add this to the **//~/.config/pulse/default.pa// 64 | {{{code: lang="texinfo" linenumbers="True" 65 | # automatically switch to newly-connected devices 66 | load-module module-switch-on-connect 67 | }}} 68 | 69 | 70 | **# Then **//trust//** the device through the **//bluetoothctl//** shell** 71 | **# Obtain and pair the device MAC as explained in **bluetooth 72 | $ bluetoothctl 73 | $ trust //<MAC_ADDRESS>// 74 | 75 | **# The bluetooth adapter does not **//power on //**between reboots** 76 | **# (the **//bluetoothctl//** > **//power on//** powering on)** 77 | **# To correct this, create a udev rule in **///etc/udev/rules.d/10-local.rules// 78 | **# Add the following** 79 | {{{code: lang="texinfo" linenumbers="True" 80 | # Set bluetooth power up 81 | ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/usr/bin/hciconfig %k up" 82 | }}} 83 | 84 | 85 | -------------------------------------------------------------------------------- /Ranger.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-12T07:29:21+01:00 4 | 5 | ====== Ranger ====== 6 | Created Thursday 12 January 2017 7 | 8 | **Ranger is a Vi like file manager - simply put, file manager from the terminal.** 9 | 10 | == Installation == 11 | **# The File Manager** 12 | $ pacman -S ranger 13 | 14 | **# My config also uses **//atool//** for file extraction/compression** 15 | $ pacman -S atool 16 | 17 | **# The sweet image previewer also needs **//w3w// 18 | $ pacman -S w3m 19 | 20 | **# Folder/file Search (custom command) also needs **//zfz// 21 | $ pacman -S zfz 22 | 23 | ===== Configuration ===== 24 | **# Configuration files at Github** 25 | **# **//Ranger//** reads its configuration files from **//~/.config/ranger// 26 | 27 | **# Three files worth looking at; ** 28 | **# **//rc.conf //**= startup commands and keybinds** 29 | **# **//commands.py //**= commands which are launched with : (colon)** 30 | **# **//rifle.conf //**= applications to use, when a file is launched ** 31 | 32 | 33 | == Default Configurations == 34 | **# To get a copy of the default configuration files, run** 35 | $ ranger --copy-config=all 36 | 37 | ===== Themes ===== 38 | **# You can find some sweet themes here **http://dotshare.it/category/fms/ranger/ 39 | **# To use a different theme than the default, first create a new subfolder ** 40 | $ mkdir ~/.config/ranger/colorschemes 41 | 42 | **# Then add the colorscheme to a **//.py//** file (**//colorscheme.py //**ex)** 43 | 44 | **# Look at the ClassName for the scheme you find** 45 | **# And the name to the **//colorscheme//** variable in **//~/.config/ranger/rc.conf// 46 | {{{code: lang="texinfo" linenumbers="True" 47 | set colorscheme ColorScheme 48 | }}} 49 | 50 | 51 | 52 | ===== Troubleshoot ===== 53 | **# If you're experiencing problems with Ranger, it's probably caused by your personal configurations ** 54 | **# Run a clean instance (without the local **//~/.config/ranger/* //**configurations)** 55 | $ ranger --clean 56 | 57 | **# If this solves the issue - you can ex. do the **//Copy Default Configurations//** from above - ** 58 | **#** **or sort your own out** 59 | 60 | -------------------------------------------------------------------------------- /Reddit_Terminal_Viewer.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-15T15:41:18+01:00 4 | 5 | ====== Reddit Terminal Viewer ====== 6 | Created Wednesday 15 February 2017 7 | 8 | **RTV allows you to read Reddit news from your terminal^** 9 | 10 | ===== Installation ===== 11 | **# I couldn't get the **//rtv//** or **//rtv-git//** (AUR) packages to work. ** 12 | **# The workaround was to install it through the **//Python//** package tool** 13 | $ pacman -S python-pip 14 | 15 | **# Then install it with PIP (SUDO!)** 16 | $ sudo pip install rtv 17 | 18 | == urlview == 19 | **# So you are able to launch links in your browser, install a urlviewer** 20 | $ yaourt -S urlview 21 | 22 | **# Edit **///etc/urlview/system.urlview//** and change the **//COMMAND//** variable** 23 | **# Assuming your still on Firefox (**//%s//** will be replaced with the URL);** 24 | {{{code: lang="texinfo" linenumbers="True" 25 | COMMAND firefox %s 26 | }}} 27 | 28 | 29 | 30 | ===== Usage ===== 31 | **# RTV is pretty self explanatory ** 32 | **# Hit **//?//** to open the Help menu** 33 | 34 | == Login == 35 | **# Login by hitting **//u// 36 | **# This will open your browser > Reddit and ask for permission.** 37 | **# You have to do a **///front//** to refresh the mainpage after logging in** 38 | 39 | == Navigation == 40 | **# Navigate up/down with **//Up/Down//** arrow keys** 41 | **# Open/back in articles with **//Left/Right//** arrow keys** 42 | 43 | == Open Links == 44 | **# With the **//urlview//** package installed, you can navigate a post/comment with a URL and hit **//b// 45 | **# Then hit **//Enter//** to open the link in your browser^** 46 | 47 | == Navigate Sub Reddits == 48 | **# Navigate Reddit (sub-reddits) with **/ 49 | **# Ex, go to Arch Reddit **///r/archlinux// 50 | **# Or combine sub reddits **///r/archlinux+linux// 51 | 52 | **# Back to Front with **///front// 53 | 54 | **# Your profile page **///u/me// 55 | **# Or others profile **///u/<PROFILE_NAME>// 56 | 57 | == Vote == 58 | **# Upvote with **//a// 59 | **# Downvote with **//z// 60 | -------------------------------------------------------------------------------- /SASS.txt: -------------------------------------------------------------------------------- 1 | ====== SASS ====== 2 | Created Thursday 08 June 2017 3 | 4 | ===== Installation ===== 5 | **# In order to install the SASS pre-compiler, first install **//Ruby// 6 | $ pacman -S ruby 7 | 8 | **# Ruby provides you its own package manager, called **//gem// 9 | **# Use **//gem//** to install **//SASS// 10 | $ sudo gem install sass 11 | 12 | **# Confirm its installation** 13 | $ sass -v 14 | 15 | 16 | ===== Usage ===== 17 | **# Write you SASS in documents with a **//.scss //**suffix.** 18 | **# Once satisfied, convert the document to a normal CSS file** 19 | $ sass //input.scss output.css// 20 | 21 | **# You may also have SASS watch a file, and change the output in live action** 22 | **# Note the file separator : (colon)** 23 | $ sass --watch input.scss:output.css 24 | 25 | **# If you have a directory with several files, make SASS watch the whole directory and change the output live** 26 | **# Note the file separator : (colon)** 27 | $ sass --watch //input-dir//://output-dir// 28 | -------------------------------------------------------------------------------- /SSMTP.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-13T23:55:21+01:00 4 | 5 | ====== SSMTP ====== 6 | Created Friday 13 January 2017 7 | 8 | **SSMTP is a program that can deliver E-mails from our local computer. ** 9 | 10 | == Installation == 11 | $ pacman -S ssmtp 12 | 13 | == Configuration == 14 | **# This is setup to deliver mails to my private domain mail (info@sloa.dk)** 15 | **# For obvious reasons, the password has been left out ** 16 | **# Corrected this, then override the default **///etc/ssmtp/ssmtp.conf//** with the following ** 17 | {{{code: lang="texinfo" linenumbers="True" 18 | # The user that gets all the mails (UID < 1000, usually the admin) 19 | root=info@sloa.dk 20 | 21 | # The mail server (where the mail is sent to), both port 465 or 587 should be acceptable 22 | # See also https://support.google.com/mail/answer/78799 23 | mailhub=asmtp.unoeuro.com:587 24 | 25 | # The address where the mail appears to come from for user authentication. 26 | rewriteDomain=unoeuro.com 27 | 28 | # The full hostname 29 | hostname=dinnabo 30 | 31 | # Use SSL/TLS before starting negotiation 32 | UseTLS=Yes 33 | UseSTARTTLS=Yes 34 | 35 | # Username/Password 36 | AuthUser=info@sloa.dk 37 | AuthPass= 38 | AuthMethod=LOGIN 39 | 40 | # Email 'From header's can override the default domain? 41 | FromLineOverride=yes 42 | }}} 43 | 44 | 45 | **# Having passwords in plaintext is insecure - so we'll secure the newly edited **//ssmtp.conf//** file** 46 | **# Create a ssmtp group** 47 | $ groupadd ssmtp 48 | 49 | **# Set the newly created group as owner of the **//ssmtp.conf//** file** 50 | $ chown :ssmtp /etc/ssmtp/ssmtp.conf 51 | 52 | **# Set the newly created group as owner of the ssmtp binary** 53 | $ chown :ssmtp /usr/bin/ssmtp 54 | 55 | **# Limit access to just root and ssmtp** 56 | $ chmod 640 /etc/ssmtp/ssmtp.conf 57 | 58 | **# And set the SGID on the ssmtp binary** 59 | $ chmod g+s /usr/bin/ssmtp 60 | 61 | == Usage == 62 | **# Test if everything works** 63 | $ echo "this is the body" | mail -s "Subject" jeppesen@tutanota.com 64 | 65 | **# You can also send mails by creating a empty text file and providing it to the mail function.** 66 | **# Here's a template; **//~/test-mail.txt// 67 | {{{code: lang="texinfo" linenumbers="True" 68 | To:jeppesen@tutanota.com 69 | From:info@sloa.dk 70 | Subject: Test 71 | 72 | This is a test mail. 73 | }}} 74 | 75 | 76 | **# Then provide the text-file to the mail function** 77 | $ mail jeppesen@tutanota.com < ~/test-mail.txt 78 | -------------------------------------------------------------------------------- /Server_and_Client.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-03T13:49:41+01:00 4 | 5 | ====== Server and Client ====== 6 | Created lørdag 03 december 2016 7 | 8 | **# Install the **//openssh//** package. This will have to be installed on both a client or a server machine.** 9 | $ pacman -S openssh 10 | 11 | ===== Client Usage ===== 12 | **# Client side usage** 13 | **# The default SSH port is **//22// 14 | 15 | == Usage == 16 | **# Connecting to a server** 17 | $ ssh -p //<portnumber> <user>//@//<server-address> //**# Note the **//@ //**between user and address.** 18 | 19 | == Tips and Tricks == 20 | **# Run process on the server display output - ex. running **//mplayer//** on your media-server^** 21 | $ DISPLAY=:0 mplayer ///path/to/movie //-fs 22 | 23 | == Configuration == 24 | **# Add/edit **//~/.ssh/config //**This will be referred to as the ssh configuration** 25 | **# Add a global username for all the hosts you visit** 26 | {{{code: lang="texinfo" linenumbers="True" 27 | User <USER_NAME> 28 | }}} 29 | 30 | 31 | **# Improved performance, add the following to the ssh configuration** 32 | {{{code: lang="texinfo" linenumbers="True" 33 | ControlMaster auto 34 | ControlPersist yes 35 | ControlPath ~/.ssh/sockets/socket-%r@%h:%p 36 | }}} 37 | 38 | 39 | == Host Aliasses == 40 | **# To provide an alias for a commonly used host, add the following to the ssh config** 41 | {{{code: lang="texinfo" linenumbers="True" 42 | Host <SERVER_NAME> # Give it a optional name 43 | HostName <SERVER_ADDRESS> 44 | Port <PORT_NUMBER> 45 | }}} 46 | 47 | 48 | **# You are now able to use alias shortcuts, instead of the full **//ssh user@host//** string** 49 | $ ssh //<SERVER_NAME>// 50 | 51 | 52 | ===== Server Usage ===== 53 | **# Server side usage** 54 | 55 | == URxvt == 56 | **# While using URxvt on your local (client) machine, it'll act up connecting to the server.** 57 | **# Binds all messed and what not - To fix this, install **//rxvt-unicode-terminfo //**on the server machine** 58 | $ pacman -S rxvt-unicode-terminfo 59 | 60 | == Configuration == 61 | **# The configuration file can be found in **///etc/ssh/sshd_config // 62 | **#** **Note the "d" **//ssh//**d**_config **(daemon) - This will be referred to as the configuration file ** 63 | 64 | **# Disable root login, edit the following in the configuration file** 65 | {{{code: lang="texinfo" linenumbers="True" 66 | PermitRootLogin no 67 | }}} 68 | 69 | 70 | **# Change port number (optional) - default is port 22** 71 | {{{code: lang="texinfo" linenumbers="True" 72 | Port <PORT_NUMBER> 73 | }}} 74 | 75 | 76 | **# To disable the SSH login (password login) - f.ex. to only use SSH key authentication (See below). ** 77 | **# Uncomment and change to **//no//** in the following ** 78 | {{{code: lang="texinfo" linenumbers="True" 79 | PasswordAuthentication no 80 | ChallengeResponseAuthentication no 81 | }}} 82 | 83 | 84 | == SSH key authentication == 85 | **# The public key, from the client, will have to be located on the server machine.** 86 | **# Say our clients public SSH key is located on our servers home folder **//~///<somekey>//.pub// 87 | 88 | **# Create, if it doesn't already exists, a folder at **//~/.ssh// 89 | $ mkdir ~/.ssh 90 | $ chmod 700 ~/.ssh 91 | 92 | **# Import the public key, from the client, to the **//authorized_keys//** file ** 93 | $ cat ~///<somekey>//.pub >> ~/.ssh/authorized_keys 94 | 95 | **# Remove the public key and change the folder permission back to only user-usable** 96 | $ rm ~///<somekey>//.pub 97 | $ chmod 600 ~/.ssh/authorized_keys 98 | 99 | 100 | ==== Starting the daemon ==== 101 | **# Starting the server side daemon** 102 | 103 | == The easy way == 104 | **#** **just starting the daemon to constantly be running (preferred option below)** 105 | **# This method might come in handy if you have several (maybe unknown) IPs connecting** 106 | $ systemctl enable sshd.service **# Note the preferred option below!** 107 | 108 | == The preferred way == 109 | **# To only start the daemon process when a allowed connection is incomming, enable the following** 110 | $ systemctl enable sshd.socket 111 | $ systemctl enable sshd@.service 112 | 113 | **# Edit your socket file to ONLY allow certain IP-adresses** 114 | $ systemctl edit sshd.socket 115 | 116 | **# Add the following - portnumber is the port that the SERVER/HOST is listening for (default 22)** 117 | {{{code: lang="texinfo" linenumbers="True" 118 | [socket] 119 | FreeBind=true 120 | ListenStream= # Add ip and portnumber, ex 192.168.0.1:22 121 | ListenStream=<IP_ADDRESS>:<PORT_NUMBER> 122 | }}} 123 | 124 | 125 | 126 | ==== Tips and Tricks ==== 127 | **# Some random Tips and Tricks** 128 | 129 | == Keep Alive == 130 | **# To make sure that the SSH server wont log you out, ** 131 | **#** **uncomment and change the following in the configuration file** 132 | {{{code: lang="texinfo" linenumbers="True" 133 | ClientAliveInterval 120 134 | }}} 135 | 136 | 137 | -------------------------------------------------------------------------------- /Software.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-31T16:31:53+01:00 4 | 5 | ====== Software ====== 6 | Created mandag 31 oktober 2016 7 | 8 | **We'll list a few methods of getting Application, Driver, kernel and log information** 9 | 10 | == Logs == 11 | **#** Y**ou can use **//|grep //** for a more specific result** 12 | **#** **You'll usually find error logs in **///var/logs// 13 | 14 | == dmesg == 15 | **# dmesg is an event viewer** 16 | $ dmesg 17 | 18 | == Kernel == 19 | # **To show kernel drivers handling each device ** 20 | $ lspci -k 21 | 22 | **# Show Kernel** 23 | $ uname -a 24 | 25 | == GPU driver == 26 | **# Show which video-driver is being used by X-org** 27 | $ lspci -nnk | grep -i vga -A3 | grep 'in use' 28 | 29 | == Application == 30 | **# Show possible locations for application** 31 | $ whereis //<APP_NAME>// 32 | 33 | **# Show what will be run be default ** 34 | $ which //<APP_NAME>// 35 | 36 | == tldr == 37 | **# **//man//** pages are genius** 38 | **# **//tldr //**is the to long don't read of **//man//** pages ** 39 | **# It will cut straight to the chase and tell you the most common commands^** 40 | $ yaourt -S nodejs-tldr-git 41 | 42 | **# Then just use it the same way, you would with **//man// 43 | **# Ex for **//tar// 44 | $ tldr tar 45 | -------------------------------------------------------------------------------- /Steam.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-17T01:26:13+01:00 4 | 5 | ====== Steam ====== 6 | Created Tuesday 17 January 2017 7 | 8 | == Installation == 9 | **# These packages are required by Steam (some might already be installed)** 10 | **# You should also have been through **//Video Driver//** and **//Sound//** for 32-bit support of both sound and video** 11 | $ pacman -S steam lib32-curl lib32-libgpg-error steam-native-runtime 12 | 13 | == Running == 14 | **# Always use the **//steam-native//** command - or the **//Steam (Native)//** from dmenu.** 15 | 16 | ===== Configuration ===== 17 | **# Steam allows you to use custom commands when launching games** 18 | **# From your Steam Library, right click any game and select Properties to set the the Launch Options.** 19 | **# Steam replaces **//%command%//** with the game-launch command** 20 | **# Below is a couple of Launch Options examples ** 21 | **#** **(**//Game Library > Right Click Game > Options > Set Launch Options//**)** 22 | 23 | == 64-bit Games == 24 | **# To use the Nvidia driver (optirun) on a 64b game, set this launch option** 25 | LD_PRELOAD=/usr/lib/nvidia/libGL.so optirun %command% 26 | 27 | 28 | == 32-bit Games == 29 | **# Like-wise for 32b games, set this launch option** 30 | LD_PRELOAD=/usr/lib32/nvidia/libGL.so optirun %command% 31 | 32 | 33 | == Desktop Entries == 34 | **# Instead of having to decide between native and runtime when you wanna run steam** 35 | **# Copy the **//steam.desktop//** to your local application folder** 36 | $ cp /usr/share/applications/steam.desktop ~/.local/share/applications 37 | 38 | **# Then Edit the copied entry and add the following line** 39 | {{{code: lang="texinfo" linenumbers="True" 40 | NoDisplay=true 41 | }}} 42 | 43 | 44 | **# For the Steam Native entry, first create a file in **///usr/local/bin/steam-preload//** and add the following** 45 | **# This will also force Steam to load the up-to-date system libraries ** 46 | {{{code: lang="texinfo" linenumbers="True" 47 | LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam "$@" 48 | }}} 49 | 50 | 51 | **# The Copy the Steam Native entry** 52 | $ cp /usr/share/applications/steam-native.desktop ~/.local/share/applications 53 | 54 | **# And Edit the **//Exec//** line to run our newly created file** 55 | {{{code: lang="texinfo" linenumbers="True" 56 | Exec=/usr/local/bin/steam-preload %U 57 | }}} 58 | 59 | 60 | == Close Button == 61 | **# Steam will not react at all when you hit the x (close) button. ** 62 | **# Note, this fix will make sure Steam closes to status-bar, but it is still running!** 63 | **#** **Edit **///usr/bin/steam//** and add the following environment variable ** 64 | {{{code: lang="texinfo" linenumbers="True" 65 | export STEAM_FRAME_FORCE_CLOSE=1 66 | }}} 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Sublime.txt: -------------------------------------------------------------------------------- 1 | ====== Sublime ====== 2 | Created Monday 09 January 2017 3 | 4 | **We'll be using the bleeding edge Sublime Text 3 as our IDE. ** 5 | 6 | == Installation == 7 | $ yaourt -S sublime-text-dev 8 | 9 | 10 | ===== Plugins ===== 11 | **# Sublime gives the opportunity to add a great amount of addons. Here's some of the favorites^** 12 | **# Enter the Command Palette with **//Ctrl+Shift+p// 13 | 14 | == Package Control == 15 | **# In order to get access to all these wonderful addons, one first have to add Package Control.** 16 | **# In Sublime, go to **//View > Show Console//** and paste the following** 17 | {{{code: lang="texinfo" linenumbers="True" 18 | import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) 19 | }}} 20 | 21 | 22 | **# You can now launch **//Package *//** from the Command Palette** 23 | 24 | == Sidebar Enhancement == 25 | **# For the commonly used open/close etc etc in sidebar. ** 26 | **# Install with Package Controll; **//SidebarEnhancement// 27 | 28 | == Clickable URLs == 29 | **# Underlines and let you open links from Sublime** 30 | **# Install with Package Control; **//Clickable URLs// 31 | 32 | == Alignment == 33 | **# Lets you align the code more neatly, lining up = (equals) etc.** 34 | **# Install with Package Control; **//Alignment// 35 | 36 | == TrailingSpaces == 37 | **# Trim whitespaces ** 38 | **# Install with Package Control; **//TrailingSpaces// 39 | 40 | == MarkDown Editing == 41 | **# Better Markdown (.MD) support** 42 | **# Install with Package Control; **//MarkdownEditing// 43 | 44 | == DocBlockr == 45 | **# Documentation/comments with ease** 46 | **# Install with Package Control; **//DocBlcokr// 47 | 48 | == Nbspr == 49 | **# Let's you easily toggle spaces with **// // 50 | 51 | == StringEncode == 52 | **# Lets you manipulate string - very useful to escape out syntax characters for code previews** 53 | **# Convert special characters into their HTML entity; **//html_entitize// 54 | **# Convert HTML entities into special characters; **//html_deentitize// 55 | **# And much more! Check out the options with; **//stringEncode// 56 | 57 | == Spacegray (theme) == 58 | **# Pretty sweet theme** 59 | **# Install with Package control; **//Theme - Spacegray// 60 | **# Then add this to your settings file (**//Preferences > Settings//**)** 61 | {{{code: lang="texinfo" linenumbers="True" 62 | { 63 | "theme": "Spacegray.sublime-theme", 64 | "color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme" 65 | } 66 | }}} 67 | 68 | 69 | == Sass == 70 | **# For LaTex and Sublime - adds SASS syntax support** 71 | 72 | == AutoPrefixr == 73 | **# Creates the vendor prefixes (browser specific properties)** 74 | **# Requres Note.js 4+ (you probably have it)** 75 | 76 | == Code Intel == 77 | **# The **//SublimeCodeIntel //**provides hints to methods, functions, objects a.a. ** 78 | **# Must have for the OOD. ** 79 | 80 | == SublimeLinter == 81 | **# Helps check the code. It interacts and checks code integrity in many forms and ways.** 82 | 83 | == SublimeLinter-Php == 84 | **# Same as above, but with the PHP extension. ** 85 | 86 | == GitGutter == 87 | **# Keeps track of the latest changes (since last commit) with a little dot next to the line number.** 88 | 89 | == PHP Completion Kit == 90 | **# With PHP 7+ support. ** 91 | 92 | == CSS3 == 93 | **# Better CSS3 highlighting ** 94 | **# Once installed, disable the default CSS plugin by hitting **//Ctrl+P //**and type **//Disable Package// 95 | **# From there, disable the **//CSS//** package.** 96 | -------------------------------------------------------------------------------- /Sublime_mapping.txt: -------------------------------------------------------------------------------- 1 | ====== Sublime mapping ====== 2 | Created Tuesday 10 January 2017 3 | 4 | **Sublime comes with a great bunch of features - we'll note some of em' down, along with our installed Plugins controls. ** 5 | 6 | == Smart Selecting == 7 | **# Select a word and hit **//Ctrl+d//** to select the next instance of that word** 8 | **# Select a whole line with **//Ctrl+l// 9 | **# Select everything within a bracket (a whole CSS snippet etc) with **//Ctrl+Shift+m// 10 | **# You can hold down **//Ctrl//** and select multiple lines with your mouse** 11 | 12 | == Smart Moving == 13 | **# Move current line up/down with **//Ctrl+Shift+Arrows// 14 | 15 | == Merge Lines == 16 | **# Mark the lines you'd like to merge and hit **//Ctrl+j// 17 | **# If you don't mark lines, the below line will be merged** 18 | 19 | == Sort your code alphabetic == 20 | **# Select some variables and hit **//F9// 21 | **# This will order the variables in alphabetic order - pretty genius! Especially for CSS.** 22 | 23 | == Browse through your CSS tags == 24 | **# I think this only work with your created CSS tags - but gives a good overview inside a large CSS file** 25 | **# Hit **//Ctrl+r //**to bring up the palette with an easy overview** 26 | 27 | == Toggle Spellchecking == 28 | **# Hit **//F6//** to toggle between spellcheck on/off** 29 | 30 | == Distraction free environment == 31 | **# Enter a distraction free code environment with **//Shift+F11// 32 | 33 | == Navigation; Files, Classes - or jump to linenumber == 34 | **# Navigate files in project, hit **//Ctrl+p// 35 | **# Navigate Classes in files, hit **//Ctrl+p//** and type **//#// 36 | **# Jump to linenumber, hit **//Ctrl+p//** and type**// :105//** (ex) to go to line 105. Note the colon ( : ) in front. ** 37 | 38 | 39 | ===== Command Palette ===== 40 | **# Here's a couple of sweet examples from the Command Palette** 41 | **# Open the Command Palette with **//Ctrl+Shift+p// 42 | 43 | == Syntax == 44 | **# You can select what syntax to highlight from, type **//syntax//** to display the list.** 45 | 46 | == Rename File == 47 | **# Simply type **//rename //**and hit Enter to rename a file** 48 | 49 | == Snippet Examples == 50 | **# To get some snippet examples, type **//snippet// 51 | 52 | 53 | ===== Plugin Usage ===== 54 | **# According to the plugins in the Sublime installation article** 55 | 56 | == ClickAble URLs == 57 | **# Navigate over a link and hit **//Ctrl+Alt+Enter// 58 | 59 | == Trailing Spaces == 60 | **# Open the Command Palette and type **//trailing//** for options** 61 | 62 | == Alignment == 63 | **# Mark the code that you'd like aligned and hit **//Ctrl+Alt+a// 64 | 65 | == DocBlockr == 66 | **# Start to type **///**//** and hit **//<tab> //**to jump to next line and enclose comment** 67 | **# If there is a function directly below, dockblokr will prepare documentation for that function** 68 | 69 | == Nbspr == 70 | **# Select some text and hit **//Ctrl+Shift+Q//** to toggle between **//spaces//** and **// // 71 | -------------------------------------------------------------------------------- /Systemd.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T20:34:05+02:00 4 | 5 | ====== Systemd ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | **systemd manages system units **//.sockets .service .mount //**and**// .device //**files.** 9 | 10 | **#** **List running units : **systemctl 11 | **#** **Failed units : **systemctl --failed 12 | **#** **Start unit : **systemctl start //unit// 13 | **#** **Stop unit : **systemctl stop //unit// 14 | **#** **Restart unit : **systemctl restart //unit// 15 | **#** **Unit status : **systemctl status //unit// 16 | **#** **Enable a unit on boot : **systemctl enable //unit// 17 | **#** **Disable a unit on boot : **systemctl disable //unit// 18 | **#** **See if is enabled or not : **systemctl is-enabled //unit// 19 | 20 | == Tips and Tricks == 21 | **#** **GUI tool for systemd ** 22 | $ pacman -S systemd-ui 23 | -------------------------------------------------------------------------------- /Terminal.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-10T07:07:55+01:00 4 | 5 | ====== Terminal ====== 6 | Created Tuesday 10 January 2017 7 | 8 | ===== URxvt ===== 9 | **# A little sweetnes from URxvt - well, from the plugins I guess** 10 | 11 | == Resize Font == 12 | **# Resize with **//Ctrl+Up/Down// 13 | 14 | == Keyboard Select == 15 | **# **//Alt+Esc//** activates Keyboard Select** 16 | **# Begin search with **//Alt+s// 17 | **# Use with;** 18 | **#** h j k l **=** **Move cursor left/down/up/right (also with arrow keys)** 19 | **#** g G 0 ^ $ H M L f F ; , w W b B e E **=** **More Vi-like cursor movement keys** 20 | **#** / ? **=** **Start forward/backward search** 21 | **#** n N **= Repeat last search, **//N//**: in reverse direction** 22 | **#** Ctrl+f/b **= Scroll down/up one screen** 23 | **#** Ctrl+d/u **=** **Scroll down/up half a screen** 24 | **#** v V Ctrl-v **=** **Toggle normal/linewise/blockwise selection** 25 | **#** y Return **=** **Copy selection to primary buffer, Return: quit afterwards** 26 | **#** Y **=** **Copy selected lines to primary buffer or cursor line and quit** 27 | **#** q Escape **= Quit keyboard selection mode** 28 | 29 | 30 | ===== Zsh ===== 31 | **# Some of the default Zsh features + a few additions according to the **//.zshrc//** (Github)** 32 | 33 | == Put to Background == 34 | **# Place programs that take up the terminal - like Vim - in the background with **//Ctrl+z// 35 | **# To get the background process back to the **//ForeGround//** again, type** 36 | $ //fg// 37 | 38 | **# If you have more than one program suspended, list them all with ** 39 | $ bg 40 | 41 | **# And to bring back the **//N//** background-process** 42 | $ fg //N// 43 | 44 | == Search in History == 45 | **# You can start typing a command and hit **//ArrowUp//** to find exact matching commands** 46 | **# For a more loose history search, hit **//Ctrl+r // 47 | **# If you started searching and hit **//Ctrl+r//** again, it'll browse through the history records** 48 | 49 | == Open Command in Editor == 50 | **# Useful for long commands - open it in your editor **//Ctrl+x Ctrl+e// 51 | 52 | == Clearing text == 53 | **# Delete the current line with **//Ctrl+u// 54 | **# Delete everything after cursor with **//Ctrl+k// 55 | **# Clear the terminal (**//clear//**) with **//Ctrl+l// 56 | 57 | 58 | ===== Zsh Plugins ===== 59 | **# Here's the shortcuts provided by the plugins in the Zsh installation article ** 60 | 61 | == Dirhistory == 62 | **# Navigate back and forth in folder with **//Alt+Left/Right // 63 | 64 | == base64 == 65 | **# Encode ** 66 | $ encode64 //<string>// 67 | 68 | **# Decode ** 69 | $ decode64 //<string>// 70 | 71 | == Sudo == 72 | **# Hit **//Esc//** twice to place a **//sudo//** in front of your current command** 73 | 74 | == Urltools == 75 | **# Encode ** 76 | $ urlencode //<string>// 77 | 78 | **# Decode ** 79 | $ urldecode //<string>// 80 | 81 | == Web-search == 82 | **# Opens your browser > search engine** 83 | **# DuckDuckGo; **ddg //<string>// 84 | **# Google; **google //<string>// 85 | -------------------------------------------------------------------------------- /Terminal_Keks.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-22T01:35:25+01:00 4 | 5 | ====== Terminal Keks ====== 6 | Created torsdag 22 december 2016 7 | 8 | **Just pass along - nothing to see here. ** 9 | 10 | ===== Fortune ===== 11 | **# Fortune will display a random quote ** 12 | $ pacman -S fortune-mod 13 | 14 | **# A set of "offensive" quotes can be found in **///usr/share/fortune/off/// 15 | 16 | ===== Cowsay ===== 17 | **# Cowsay will produce a ASCII image of - well the default is a cow (who'd know)** 18 | $ pacman -S cowsay 19 | 20 | **# ASCII images can be found in **///usr/share/cows/// 21 | **# They can also be listed with **//cowsay -l// 22 | **# Use a specific image with **//cowsay -f <themeName>// 23 | 24 | ===== Lolcat ===== 25 | **# Lolcat will produce rainbow colors in your terminal** 26 | $ pacman -S lolcat 27 | 28 | == General Usage == 29 | **# Pipe something with **//lolcat//**. The Calendar etc** 30 | $ cal | lolcat 31 | 32 | **# Animation (**//-a//**)** 33 | **# **//-d//** = duration** 34 | $ echo "You've been kekd" | lolcat -a -d 500 35 | 36 | 37 | ===== Combining for Keks ===== 38 | **# Random **//cowsay//** image, with random facial expression and random qoute from **//fortune// 39 | $ fortune -a | fmt -80 -s | $(shuf -n 1 -e cowsay cowthink) -$(shuf -n 1 -e b d g p s t w y) -f $(shuf -n 1 -e $(cowsay -l | tail -n +2)) -n 40 | 41 | -------------------------------------------------------------------------------- /Theming.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-19T05:34:17+01:00 4 | 5 | ====== Theming ====== 6 | Created mandag 19 december 2016 7 | 8 | **I'll try to put-together a list of sweet ass themes. ** 9 | **Manage your themes with **lxappearance**.** 10 | 11 | ===== Lxappearance ===== 12 | **#** **Lxappearance will allow you to set a system wide font in gtk themed application etc.** 13 | $ pacman -S lxappearance 14 | 15 | **# You can run **//lxappearance //**to get the GUI controls. ** 16 | 17 | == Configuration == 18 | **# Changing a font value in lxappearance (and apply) will generate configurations for gtk-2 and gtk-3.** 19 | **# Find them in **//~/.gtkrc-2.0 //**and **//~/.config/gtk-3.0/settings.ini //**and change the content to your liking.** 20 | 21 | 22 | ===== Window Themes ===== 23 | **# Some sweet ass Window Themes** 24 | 25 | == Arc == 26 | **# The **//arc-theme//** is pretty sweet** 27 | **# As long as you use Firefox, you should install the following **//arc-theme //**from the browser/plugins** 28 | $ yaourt -S arc-firefox-theme 29 | 30 | 31 | ===== Cursor Themes ===== 32 | **# A lil' cursor bling ** 33 | 34 | == Vanilla DMZ == 35 | **# A bit more interesting than the default - still quite neutral though** 36 | **# Comes in a light and dark version (-aa = dark version)** 37 | $ pacman -S xcursor-vanilla-dmz 38 | $ pacman -S xcursor-vanilla-dmz-aa 39 | 40 | 41 | ===== Grub2 ===== 42 | **# Some sweet ass Grub Themes** 43 | 44 | == Archlinux Grub theme == 45 | **# Not sure if I like the default better, but hey** 46 | $ yaourt -S grub2-theme-archlinux 47 | 48 | **# Edit the **///etc/default/grub //**configuration file** 49 | **# Change, and out-comment, the **//GRUB_THEME="" //**line to** 50 | {{{code: lang="texinfo" linenumbers="True" 51 | GRUB_THEME="/boot/grub/themes/Archlinux/theme.txt" 52 | }}} 53 | 54 | 55 | **# Also change the **//GRUB_GFXMODE=auto//** to (best viewed)** 56 | {{{code: lang="texinfo" linenumbers="True" 57 | GRUB_GFXMODE=1024x768 58 | }}} 59 | 60 | 61 | **# Then re-configure your grub ** 62 | $ grub-mkconfig -o /boot/grub/grub.cfg 63 | -------------------------------------------------------------------------------- /Tor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-08T21:56:00+01:00 4 | 5 | ====== Tor ====== 6 | Created Sunday 08 January 2017 7 | 8 | **Tor is a Proxy service best used with Tor-Browser. We'll install and configure both - along with adding the possibility to enable it through our browser (Firefox) too. ** 9 | 10 | ===== Installation ===== 11 | **# Tor** 12 | $ pacman -S tor 13 | 14 | == Tor Browser Bundle == 15 | **# One must first read their gpg key** 16 | $ gpg --keyserver pool.sks-keyservers.net --recv-keys 2E1AC68ED40814E0 17 | 18 | **# Then install their browser^** 19 | $ yaourt -S tor-browser-en 20 | 21 | ===== Configuration ===== 22 | **# For security purposes we want to run our Tor service from a chroot environment. ** 23 | **# For this, we will use a script. This will create a chroot in **///opt/torchroot// 24 | **# Create a file in your executable path - for me that would be **//~/dotfiles/scripts/torchroot-setup.sh// 25 | {{{code: lang="texinfo" linenumbers="True" 26 | #!/bin/bash 27 | export TORCHROOT=/opt/torchroot 28 | 29 | mkdir -p $TORCHROOT 30 | mkdir -p $TORCHROOT/etc/tor 31 | mkdir -p $TORCHROOT/dev 32 | mkdir -p $TORCHROOT/usr/bin 33 | mkdir -p $TORCHROOT/usr/lib 34 | mkdir -p $TORCHROOT/usr/share/tor 35 | mkdir -p $TORCHROOT/var/lib 36 | 37 | ln -s /usr/lib $TORCHROOT/lib 38 | cp /etc/hosts $TORCHROOT/etc/ 39 | cp /etc/host.conf $TORCHROOT/etc/ 40 | cp /etc/localtime $TORCHROOT/etc/ 41 | cp /etc/nsswitch.conf $TORCHROOT/etc/ 42 | cp /etc/resolv.conf $TORCHROOT/etc/ 43 | cp /etc/tor/torrc $TORCHROOT/etc/tor/ 44 | 45 | cp /usr/bin/tor $TORCHROOT/usr/bin/ 46 | cp /usr/share/tor/geoip* $TORCHROOT/usr/share/tor/ 47 | cp /lib/libnss* /lib/libnsl* /lib/ld-linux-*.so* /lib/libresolv* /lib/libgcc_s.so* $TORCHROOT/usr/lib/ 48 | cp $(ldd /usr/bin/tor | awk '{print $3}'|grep --color=never "^/") $TORCHROOT/usr/lib/ 49 | cp -r /var/lib/tor $TORCHROOT/var/lib/ 50 | chown -R tor:tor $TORCHROOT/var/lib/tor 51 | 52 | sh -c "grep --color=never ^tor /etc/passwd > $TORCHROOT/etc/passwd" 53 | sh -c "grep --color=never ^tor /etc/group > $TORCHROOT/etc/group" 54 | 55 | mknod -m 644 $TORCHROOT/dev/random c 1 8 56 | mknod -m 644 $TORCHROOT/dev/urandom c 1 9 57 | mknod -m 666 $TORCHROOT/dev/null c 1 3 58 | 59 | if [[ "$(uname -m)" == "x86_64" ]]; then 60 | cp /usr/lib/ld-linux-x86-64.so* $TORCHROOT/usr/lib/. 61 | ln -sr /usr/lib64 $TORCHROOT/lib64 62 | ln -s $TORCHROOT/usr/lib ${TORCHROOT}/usr/lib64 63 | fi 64 | }}} 65 | 66 | 67 | **# Make the file executable ** 68 | $ chmod +x ~/dotfiles/scripts/torchroot-setup.sh 69 | 70 | **# Run the script AS ROOT!** 71 | $ sudo ./~/dotfiles/scripts/torchroot-setup.sh 72 | 73 | **# Then edit the provided service file** 74 | $ systemctl edit --full tor.service 75 | 76 | **# And replace the **//[Service] //**section** 77 | {{{code: lang="texinfo" linenumbers="True" 78 | [Service] 79 | User=root 80 | ExecStart= 81 | ExecStart=/usr/bin/sh -c "chroot --userspec=tor:tor /opt/torchroot /usr/bin/tor -f /etc/tor/torrc" 82 | KillSignal=SIGINT 83 | }}} 84 | 85 | 86 | 87 | ===== Usage (running) ===== 88 | **# You can now start/stop the service whenever needed** 89 | $ systemctl start tor.service 90 | 91 | **# Use the **//tor-browser//** for your dirty deeds ** 92 | 93 | **# If you want applications to run over tor, these are the settings needed;** 94 | //SOCKS5//** # Connection Type** 95 | //localhost //**# Address** 96 | //9050 //**# Port** 97 | 98 | 99 | == Using with Firefox == 100 | **# The **//FoxyProxy Basic//** addon will allow you to switch between connections** 101 | **# Install it from the browsers addon page** 102 | **# Click your new FoxyProxy icon to configure and add the Connection, Address and Port from above.** 103 | -------------------------------------------------------------------------------- /Touchpad.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-27T05:40:10+01:00 4 | 5 | ====== Touchpad ====== 6 | Created tirsdag 27 december 2016 7 | 8 | **To get a proper working touch - specially lousy on the Asus Zenbook models - a little setting up is required. The default mouse behavior is terrible, so you will want to set this at a early state.** 9 | 10 | == Installation == 11 | **# The Wayland driver is a better solution. Install it with a Xorg-wrapper.** 12 | $ pacman -S xf86-input-libinput 13 | 14 | == Configuration == 15 | **# Create a file in **///etc/X11/xorg.conf.d/30-touchpad.conf//** and add the following** 16 | {{{code: lang="texinfo" linenumbers="True" 17 | Section "InputClass" 18 | Identifier "ETPS/2 Elantech Touchpad" 19 | Driver "libinput" 20 | MatchIsTouchpad "on" 21 | Option "PalmDetect" "1" 22 | Option "PalmMinWidth" "8" 23 | Option "PalmMinZ" "100" 24 | Option "Tapping" "on" 25 | EndSection 26 | }}} 27 | 28 | -------------------------------------------------------------------------------- /Users_and_Groups.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T18:02:37+02:00 4 | 5 | ====== Users and Groups ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | **#** **List files owned by a user or group ** 9 | $ find / -group <//GROUP_NAME>// 10 | $ find / -user <USER_NAME//>// 11 | 12 | **# Who is logged in** 13 | $ w 14 | 15 | **# Who are you logged in as** 16 | $ whoami 17 | 18 | 19 | ==== User Directories ==== 20 | **# To create the typical directories - Desktop, Document, Download etc.** 21 | **#** **This can easily be done with **//xdg-user-dirs// 22 | $ pacman -S xdg-user-dirs 23 | 24 | **# Then create the directories** 25 | $ xdg-user-dirs-update 26 | 27 | **# To change the default directories, you can edit **//~/.config/user-dirs.dirs// 28 | 29 | 30 | ==== User management ==== 31 | **#** **To see all users : **sudo passwd -Sa 32 | **#** **Getting UID's : **id -u //<USER_NAME>// 33 | 34 | == Adding a user == 35 | **# Adding users can be done with** //useradd //**- set password after creating the user.** 36 | -G **= add user to additional groups** 37 | -m **= create a /home folder for the user** 38 | -s **= path to default login shell** 39 | 40 | **# Creating the user and setting the password** 41 | $ useradd -m -G wheel -s /bin/bash //<USER_NAME>// 42 | $ passwd //<USER_NAME>// 43 | 44 | == Delete user == 45 | **#** //-r// **removes the home directory for the user** 46 | $ userdel -r //<USER_NAME>// 47 | 48 | == Change login name == 49 | $ usermod -l //<NEW_NAME> <OLD_NAME>// 50 | 51 | == Change home directory == 52 | **#** -m **creates the required folders and move the content there** 53 | $ usermod -d ///my/new/home// -m //<USER_NAME>// 54 | 55 | == Add user to a group == 56 | $ usermod -aG //<ADDITIONAL_GROUPS> <USER_NAME>// 57 | # **Or ** 58 | $ gpasswd --add //<USER_NAME> <GROUP_NAME>// 59 | 60 | == Remove user from a group == 61 | **# If the user is logged in, changes will take affect after logout** 62 | $ gpasswd -d //<USER_NAME> <GROUP_NAME>// 63 | 64 | == Expire password requiring them to create a new on first login == 65 | $ chage -d 0 //<USER_NAME>// 66 | 67 | 68 | ==== Group management ==== 69 | **#** **List groups that a user is member of ** 70 | $ groups //<USER_NAME>// 71 | 72 | **#** **List all groups on the system ** 73 | $ cat /etc/group 74 | 75 | **#** **Create a new group ** 76 | $ groupadd //<GROUP_NAME>// 77 | 78 | **#** **Delete group ** 79 | $ groupdel //<GROUP_NAME>// 80 | 81 | == User groups == 82 | **# Below is a list of general user groups.** 83 | **# users can, and sometimes have to, be added to these groups without worries.** 84 | 85 | adm **# admin group, similar to wheel** 86 | ftp **# access to file-server by ftp-servers** 87 | games **# access to some game software** 88 | http **# access to files served by the HTTP server** 89 | log **# access to logs in **///var/log/// 90 | rfkill **# access to control wireless power (TX-power)** 91 | sys **# access to administrate printers** 92 | users **# standard user group** 93 | uucp **# RS-232 ports and their connected devices (old keyboard, printer, mouses etc)** 94 | wheel **# administration group commonly used to give access to **//sudo/su//** none is set by default** 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /VA-API_and_VDPAU.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-23T19:05:19+01:00 4 | 5 | ====== VA-API and VDPAU ====== 6 | Created Thursday 23 February 2017 7 | 8 | **VA-API and VDPAU makes is possible for video cards to decode/encode video and thus offloade some workforce from the CPU. It says that it will therefore save power (by offloading to CPU) but I do seriously doubt that, since it'll just bring an even more power-demanding device into play.** 9 | 10 | **VA-API is for the Intel Driver and VDPAU is for the Nvidia driver.** 11 | 12 | == Installation == 13 | **# This uses VDPAU as backend for VA-API** 14 | $ pacman -S libva-vdpau-driver 15 | 16 | **# These two packages will make VA-API work as backend for VDPAU** 17 | $ pacman -S libvdpau-va-gl libva-intel-driver 18 | 19 | == Verifying == 20 | **# To verify VA-API, install **//libva// 21 | $ pacman -S libva 22 | 23 | **# and run ** 24 | $ vainfo 25 | 26 | **# You should get something like below, a driver has been found is it should handle the rest itself** 27 | vainfo: Driver version: Intel i965 driver .... 28 | 29 | **# To verify VDPAU, install **//vdpauinfo// 30 | $ pacman -S vdpauinfo 31 | 32 | **# and run** 33 | $ vdpauinfo 34 | 35 | **# You should have something like this in the output** 36 | Information string: OpenGL/VAAPI backend for VDPAU 37 | 38 | -------------------------------------------------------------------------------- /Vim.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-06T02:20:15+01:00 4 | 5 | ====== Vim ====== 6 | Created Friday 06 January 2017 7 | 8 | **Vi is a terminal based text editor - Vim is a improved version. We'll be using Gvim, which is Vim that support GTK/X.** 9 | 10 | == Installation == 11 | $ pacman -S gvim 12 | 13 | **# To manage plugins, install a package manager** 14 | $ yaourt -S vim-pathogen-git 15 | 16 | 17 | ===== Configuration ===== 18 | **# You'll find the configuration at **//~/.vimrc //**(Github)** 19 | 20 | == Color Scheme == 21 | **# The script for changing colors on the fly (Github) should be placed in **//~/.vim/plugin/setcolors.vim// 22 | **# Create the folder and Symlink the script** 23 | $ mkdir ~/.vim/plugin 24 | $ ln -s /home/stick/dotfiles/.vim/plugin/setcolors.vim /home/stick/.vim/plugin/ 25 | 26 | == Remove White GTK Border == 27 | **# Gvim has a ugly thick white border, which it inherits from the GTK settings. ** 28 | **# Edit/Create **//~/.gtkrc-2.0//** and paste the following** 29 | {{{code: lang="texinfo" linenumbers="True" 30 | style "no-resize-handle" 31 | { 32 | GtkWindow::resize-grip-height = 0 33 | GtkWindow::resize-grip-width = 0 34 | } 35 | 36 | class "GtkWidget" style "no-resize-handle" 37 | style "vimfix" { 38 | bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color. 39 | } 40 | widget "vim-main-window.*GtkForm" style "vimfix" 41 | }}} 42 | 43 | 44 | 45 | ===== Modelines ===== 46 | **# According to my vimrc, Vim will check the bottom of the file it's editing ** 47 | **# You can specify document specific settings in this line. ** 48 | 49 | == Fold markers (easy overview when opening file again) == 50 | **#** **If you've created markers in your document **//{{{ }}}// 51 | **# Place this at the bottom to make it open collapsed next time** 52 | {{{code: lang="texinfo" linenumbers="True" 53 | " vim:foldmethod=marker:foldlevel=0 54 | }}} 55 | 56 | 57 | 58 | ===== Plugins ===== 59 | **# Make sure you installed the **//pathogen//** package.** 60 | **# Now any plugin you like, can be extracted to **//~/.vim/bundle/ // 61 | **# Some sweet plugins can be found at **http://vimawesome.com/ 62 | 63 | **# Here is some of the favorites!** 64 | **# A nice and easy way to install plugins, is to navigate to the **//~/.vim/bundle//** folder ** 65 | **#** **and clone the repositories ** 66 | $ cd ~/.vim/bundle 67 | 68 | **# Solarized Color Scheme (sweet color scheme)** 69 | $ git clone git://github.com/altercation/vim-colors-solarized.git 70 | 71 | **# Airline - improved command bar** 72 | $ git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline 73 | 74 | **# AutoClose will close your () {} [] automatic ** 75 | $ git clone https://github.com/Townk/vim-autoclose.git 76 | 77 | **# NerdTree will let you navigate files and folders inside Vim** 78 | $ git clone https://github.com/scrooloose/nerdtree.git 79 | 80 | **# Gundo for a Undo/Redo tree** 81 | $ git clone http://github.com/sjl/gundo.vim.git 82 | -------------------------------------------------------------------------------- /VirtualBox.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-04-29T11:22:13+02:00 4 | 5 | ====== VirtualBox ====== 6 | Created Saturday 29 April 2017 7 | 8 | 9 | == Installation == 10 | **# Core packages (the **//linux-[lts/zen]-headers//** should already be installed)** 11 | $ pacman -S virtualbox virtualbox-host-dkms net-tools virtualbox-guest-iso 12 | 13 | **# Extension Package from the AUR** 14 | **# Provides USB, webcam etc functionality in VM** 15 | $ cower -d virtualbox-ext-oracle 16 | $ cowup 17 | 18 | == Configuration == 19 | **# Add your user to the **//vboxusers//** group** 20 | $ gpasswd --add stick vboxusers 21 | 22 | 23 | ===== Using ===== 24 | **# How to install and configure your Virtual Machines** 25 | 26 | == Installing Image == 27 | **# Download the image you wish to make a VM off** 28 | **# Open VirtualBox and click **//New// 29 | 30 | **# Choose a **//Type//** and **//Version//** along with a relevant name.** 31 | **# Allocate some memory - don't overdo it. Somewhere between 2-4GB, on my 8GB machine.** 32 | **# Select **//Create a Virtual Hard Disk Drive// 33 | **# Choose **//VHD//** for Windows products and **//VDI//** for everything else. ** 34 | **# Dynamically allocated space works fine** 35 | **# Give it an initial size** 36 | 37 | **# The "machine" is now set-up and you are able to install a image file on it** 38 | **# Right click the VM and select **//Settings// 39 | **# Go to **//Storage//** and select the Empty device in the sub-node** 40 | **# Click the little Disc next to the Drop-down (SATA Port1) and select your image file to install** 41 | **# Start the VM to start the installer. Voila. ** 42 | 43 | == Import OVA/OVF files == 44 | **# Go to **//File > Import Appliance // 45 | **# This will setup your pre-defined VM installation ** 46 | 47 | == Additional Settings == 48 | **# Once a system has been installed, you can increase the performance for that VM** 49 | **# Right click the VM and select **//Settings// 50 | 51 | **# You can Enable Shared Clipboard in **//General > Advanced// 52 | **# You can set Base-Memory in **//System //**- don't overdo, somewhere between 2-4GB on my 8GB machine** 53 | **# In **//System > Processor //**you can add an additional core** 54 | **# Enable **//3D //**and **//2D Acceleration //**in **//Display//** and crank that **//Video Memory //**to max (256MB)** 55 | **# In **//Storage//**, select the VM name (sub-node) and check **//Solid State Drive// 56 | 57 | == Guest Addition == 58 | **# The guest addition allows for hardware acceleration, shared clipboard a.a.** 59 | **# The package has been installed with the Core files (above)** 60 | **# Once your system is installed, mount the Guest ISO at the USB device and install the additions from** 61 | **# inside the system itself. ** 62 | 63 | **# The Guest ISO can be found at **///usr/lib/virtualbox/additions/VBoxGuestAdditions.iso// 64 | **# Mount this in VirtualBox, either by Right-clicking a VM and select **//Settings > Storage //**and mounting it** 65 | **# Or by mounting it through **//Devices//** at the top of a running VM.** 66 | 67 | **# In Windows f.ex. you just open the File-Manager and double click the USB device (VirtualBox Guest)** 68 | **# and let the auto-installer do the rest. ** 69 | 70 | == Fullscreen View (troubleshoot) == 71 | **# The Fullscreen doesn't work with I3** 72 | **# Right click your VM and select **//Settings > User Interface//** and deselect the **//Show in Full-screen/Seamless// 73 | **# Toggle Fullscreen with **//Right Ctrl+F// 74 | 75 | 76 | ===== Tips and Tricks ===== 77 | **# A few goodies** 78 | 79 | == Windows 10 Development Environment == 80 | **# Need to work in Visual Studio according to my school.. ** 81 | **# You can download a VM of the Windows Development Environment from the following link;** 82 | **# **https://developer.microsoft.com/en-us/windows/downloads/virtual-machines 83 | -------------------------------------------------------------------------------- /Wasteland_2.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-20T01:50:47+01:00 4 | 5 | ====== Wasteland 2 ====== 6 | Created Monday 20 February 2017 7 | 8 | **# WL apparently takes up quite a shitload of mem. ** 9 | **#** **If you experience lock-up during a loadscreen, close down Steam and run the following** 10 | **# NOTE; Not persistent ** 11 | $ ulimit -n 4096 12 | 13 | **# Open Steam > Wasteland again and you should be good to go^** 14 | -------------------------------------------------------------------------------- /Windows.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-03-18T16:51:23+01:00 4 | 5 | ====== Windows ====== 6 | Created Saturday 18 March 2017 7 | 8 | **When dual-booting Windows/Arch, the time is not running correct in Arch.. Thank you Microsoft.** 9 | **We can fix this be setting the time to UTC in Windows though, so fire up that sucker OS. ** 10 | 11 | == Regedit == 12 | **# We need to Add a entry in the Regedit, so do the **//Super+r//** to open the Run dialog and type; **//regedit// 13 | **# Navigate into the following sub-folder** 14 | HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation 15 | 16 | **# Right click and Add a **//DWORD//** with **//hexadecimal//** called **//RealTimeIsUniversal//**, set the value to **//1// 17 | -------------------------------------------------------------------------------- /Xbindkeys.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-23T18:28:34+01:00 4 | 5 | ====== Xbindkeys ====== 6 | Created fredag 23 december 2016 7 | 8 | **We can use Xbindkeys to bind actions to our **//FN//**-key.** 9 | **Well actually we could bind any key with Xbindkey, but that's what we will be using it for in this example.** 10 | 11 | == Installation == 12 | $ pacman -S xbindkeys 13 | 14 | == Configuration == 15 | **# Xbindkey reads your custom binds from **//~/.xbindkeysrc// 16 | **# Custom **//.xbindkeysrc//** on Github.** 17 | **# Once you've made changes to **//.xbindkeysrc//**, reload it with **//xbindkeys -p// 18 | 19 | -------------------------------------------------------------------------------- /Xorg.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-24T01:39:52+02:00 4 | 5 | ====== Xorg and Xinit ====== 6 | Created mandag 24 oktober 2016 7 | 8 | **Xorg is our display server and Xinit provides a way to start the server. ** 9 | 10 | ===== Xorg ===== 11 | **#** **Install the following packages :** 12 | $ pacman -S xorg-server xorg-server-utils xorg-xinit 13 | 14 | ===== Xinit ===== 15 | **# Xinit provides **//startx, xinit //**and a basic **//xinitrc//** configuration file.** 16 | 17 | == Xserverrc == 18 | **# Both **//startx //**and **//xinit//** executes **//~/.xserverrc//** which is not created by default. ** 19 | **# You should create a **//~/.xserverrc//** file ** 20 | **# The following will help maintain a session and help prevent bypassing the screen locker** 21 | {{{code: lang="texinfo" linenumbers="True" 22 | #!/bin/sh 23 | exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR 24 | }}} 25 | 26 | 27 | == Xinitrc == 28 | **# **//.xinitrc//** file can be found at GitHub. Else, follow below for a quick setup.** 29 | 30 | **# Create a copy of the default **//xinitrc //**file** 31 | $ cp /etc/X11/xinit/xinitrc ~/.xinitrc 32 | 33 | **# By default it starts a few applications. These can be commented out in the **//~/xinitrc//** file.** 34 | **# You can append applications to start leading with a **//&//** (ampersand) for multiple entries.** 35 | **# Lines after **//exec//** won't be read.** 36 | {{{code: lang="texinfo" linenumbers="True" 37 | application1 & 38 | application2 & 39 | exec dekstop 40 | }}} 41 | 42 | -------------------------------------------------------------------------------- /Xresources.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-18T19:59:19+01:00 4 | 5 | ====== Xresources ====== 6 | Created søndag 18 december 2016 7 | 8 | **User specified configuration will be read from the **//~/.Xresources //**which is not created by default. ** 9 | **Create this file for defining**// terminal colors, configure terminal preferences, setting DPI, antialiasing, hinting //**and other X font settings. ** 10 | **You can also theme your **//screensaver //**or**// Xcoursor //**along with altering preferences for low-level X applications (**//xclock//** etc).** 11 | 12 | == Installation == 13 | $ pacman -S xorg-xrdb 14 | 15 | == Configuration == 16 | **# Add the following to your **xinitrc** file.** 17 | **# NOTE: This is not needed if you are using the default **//xinit//** file** 18 | [[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources 19 | 20 | 21 | ===== Xresources .dotfile ===== 22 | **# Comments in **//Xresources //**is a exclamation mark ( ! )** 23 | **# The syntax for the **//Xresources//** goes as followes** 24 | **name.Class.resource: value** 25 | 26 | **name = **The name of the applications, such as xterm, xpdf etc 27 | **class = **Classification used to group resources together. 28 | **resource = **The name of the resource whose value is to be changed. 29 | **value = **The actual value of the resource. Can be int, bool or string value. 30 | 31 | **# My Xresources configuration file can be found at Github.** 32 | **# To see currently loaded configurations, run **//xrdb -query -all// 33 | 34 | == Character Classes == 35 | **# Might come in handy some day** 36 | {{{code: lang="texinfo" linenumbers="True" 37 | ! " # $ % & ' ( ) * + , - . / 38 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 39 | 40 | @ [ \ ] ^ _ ` { | } 41 | 64, 91, 92, 93, 94, 48, 96, 123, 124, 125, 126 42 | }}} 43 | 44 | 45 | -------------------------------------------------------------------------------- /Yaourt.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-23T13:12:22+02:00 4 | 5 | ====== Yaourt ====== 6 | Created søndag 23 oktober 2016 7 | 8 | **You should probably try and use, learn and live by **//cower//** and **//makepkg//** steps instead. ** 9 | 10 | == Installation == 11 | **#** **Edit your pacman configuration file **///etc/pacman.conf //**and add the following repository** 12 | {{{code: lang="texinfo" linenumbers="True" 13 | [archlinuxfr] 14 | SigLevel = Never 15 | Server = http://repo.archlinux.fr/$arch 16 | }}} 17 | 18 | 19 | **#** **Update your database ** 20 | $ pacman -Syy 21 | 22 | **#** **Install the yaourt package ** 23 | $ pacman -S yaourt 24 | 25 | # **Once installed, remove the **//[archlinuxfr]//** repository from **///etc/pacman.conf//** again.** 26 | 27 | == Configuration == 28 | # **Yaourt loves asking you if you'd like to edit pkgbuild.. ** 29 | # **And to confirm if you are really sure to install package.** 30 | # **Yaourt can be a pain in the ass. Create a file in **//~/.yaourtrc//** and add the following to shut it up.** 31 | {{{code: lang="texinfo" linenumbers="True" 32 | BUILD_NOCONFIRM=1 33 | EDITFILES=0 34 | }}} 35 | 36 | 37 | 38 | == General Usage == 39 | **#** **Update installed packages ** 40 | $ yaourt -Syua 41 | 42 | **#** **Check, edit, merge or remove *.pac* files ** 43 | $ yaourt -C 44 | 45 | **#** **Ignore pgp-key signature check** 46 | **#** **Change the **//siglevel//** variable in **//pacman.conf//** they said.. ** 47 | **#** **To make **//yaourt//** ignore key-signing (could not verify pgp-key yadada)** 48 | $ yaourt --m-arg --skippgpcheck -Sb //<PACKAGE_NAME>// 49 | -------------------------------------------------------------------------------- /Zsh.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-17T16:16:20+01:00 4 | 5 | ====== Zsh ====== 6 | Created lørdag 17 december 2016 7 | 8 | **Zsh is an alternate, improved, version from the Bash shell (default).** 9 | **My **//.zshrc//** file can be found at Github** 10 | 11 | == Installation == 12 | $ pacman -S zsh 13 | 14 | **# Then make it the default Shell - don't run with sudo!** 15 | $ chsh -s /bin/zsh 16 | 17 | **# For the **//Fish//**-like syntax highligthing** 18 | $ pacman -S zsh-syntax-highlighting 19 | 20 | == Configuring $PATH == 21 | **# Paths should be set in a different configuration, since there is some source conflict with /etc/profile** 22 | **# To prevent the path from being overwritten, set it in **//~/.zprofile// 23 | {{{code: lang="texinfo" linenumbers="True" 24 | typeset -U path 25 | path=(~/bin /home/stick/.scripts /usr/local/bin $path[@]) 26 | }}} 27 | 28 | 29 | 30 | ===== Configuration ===== 31 | **# User configuration is found in **//~/.zshrc// 32 | **# My Zsh configuration file can be found at Github. ** 33 | 34 | == Search official repositories when a command was invalid == 35 | **#** **This requires the pkgfile package ** 36 | $ pacman -S pkgfile 37 | 38 | **#** **Once installed the pkgfile database can be synced with ** 39 | $ pkgfile -u 40 | 41 | **#** **Enable its system timer servce ** 42 | $ systemctl enable pkgfile-update.timer 43 | 44 | **# Then add the following to the **//~/.zshrc//** file ** 45 | **#** **This is already incl. in my configuration. Just make sure the package is installed.** 46 | {{{code: lang="texinfo" linenumbers="True" 47 | source /usr/share/doc/pkgfile/command-not-found.zsh 48 | }}} 49 | 50 | 51 | == Defining Keybinds == 52 | **# To get a key-value, first hit **//Ctrl+v//** and then push the key (or key combo) to get its value** 53 | **# That value can be used in a **//bindkey//** variable to define its action, ex;** 54 | **# (Control+Delete to delete forward word) **//Ctrl+v Ctrl+Delete //** outputs **//^[[3^// 55 | **# Then we define the action of that value in the our **//.zshrc // 56 | **#** **( **//kill-word//** is the command to forward delete word)** 57 | {{{code: lang="texinfo" linenumbers="True" 58 | bindkey '^[[3^' kill-word 59 | }}} 60 | 61 | 62 | 63 | ===== Oh my Zsh ===== 64 | **# OMZsh is a shitload of additional functions and themes ready to use out-the-box** 65 | **# Below is still just added to the **//.zshrc//** file - OMZsh just adds a little extra.** 66 | **# A further explained (example) OMZsh **//.zshrc//** file can be found at **///usr/share/oh-my-zsh/zshrc// 67 | 68 | == Install from the AUR == 69 | $ yaourt -S oh-my-zsh-git 70 | 71 | == Themes == 72 | **# Original (supported) themes can be found at **https://github.com/robbyrussell/oh-my-zsh/wiki/themes 73 | **# I've found this one to be quite lovely** 74 | {{{code: lang="texinfo" linenumbers="True" 75 | ZSH_THEME="ys" 76 | }}} 77 | 78 | 79 | == Functions == 80 | **# Functions are added to the **//plugins=()//** line (space separated list)** 81 | **# A full list of functions can be found here **https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins 82 | **# Below is a list of favorites^** 83 | 84 | **# dirhistory** 85 | **# Allows you to navigate back and forth in directories (history) with the arrow keys** 86 | **# Usage : **//ALT+left ALT+right // 87 | 88 | **# encode64** 89 | **# Encode/decode base64** 90 | **# Usage : **//encode64 <string> decode64 <string>// 91 | 92 | **# screen** 93 | **# Automaticly sets title and status for **Gnu Screen 94 | 95 | **# sudo** 96 | **# **//ESC//** twice to put sudo infront of current command** 97 | 98 | **# urltools** 99 | **# For URL manipulation. Encode/decode the RFC 1738 standard** 100 | **# Usage : **//urlencode <string> urldecode <string>// 101 | 102 | **# web-search** 103 | **# adds **//bing, google, yahoo //**and **//DUCKDUCKGO! //**to command web search** 104 | **# Usage : **//ddg <search> google <search> // 105 | 106 | **# ssh-agent** 107 | **# Add the following to your **//.zshrc//** file to enable (already included in my configuration)** 108 | {{{code: lang="texinfo" linenumbers="True" 109 | zstyle :omz:plugins:ssh-agent agent-forwarding on 110 | }}} 111 | 112 | 113 | -------------------------------------------------------------------------------- /aircrack-ng.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-25T16:02:56+01:00 4 | 5 | ====== aircrack-ng ====== 6 | Created Saturday 25 February 2017 7 | 8 | **Aircrack-ng is one of the more common tools in any offensive arsenal. In this article we'll assume that the network device we'll be working with is called **//wifi1 //** (see Alpha-AWUS036H for more info on naming)** 9 | 10 | == Installation == 11 | $ pacman -S aircrack-ng 12 | 13 | 14 | ===== Usage ===== 15 | **# Aircrack-ng comes with a variety of tools. ** 16 | **#** **Below is some core information a couple of basic examples for some of these tools.** 17 | 18 | == Airmon-ng == 19 | **# This tool is used to put our network device into monitor mode. ** 20 | $ airmon-ng start wifi1 21 | 22 | **# Take notice of the output. It will change the name of the device. Ex, from **//wifi1//** to**// wifi1mon// 23 | 24 | 25 | == Airodump-ng == 26 | **# Used to capture packets. Use it with the monitor device you just set up (**//airmon-ng//**)** 27 | $ airodump-ng wifi1mon 28 | 29 | **# What we are most interested in is the **//BSSID//** and the **//Channel// 30 | **# We can then narrow down our monitor (look for handshake) to a specific BSSID** 31 | **# The **//--write//** is the file that Airodump-ng will output to, which we can later review for Handshakes.** 32 | $ airodump-ng wifi1mon --bssid //<BSSID_ADDRESS>// --channel //<CHANNEL_NO> //--write //<FILE_NAME>// 33 | 34 | 35 | == Aireplay-ng == 36 | **# Is a powerful tool in the Aircrack suite. It is used for a couple of purposes, f.ex. to Deauth people** 37 | **# from a network. It is also used for ARP injections, WEP and WPA2 password attacks and replay attacks.** 38 | **# Aireplay-ng can read **//pcap//** files, which we a.a. can generate with **//Wireshark// 39 | 40 | **# To Deauth a specific person on the network, obtain hes MAC (**//airodump//**) and run the following** 41 | $ aireplay-ng --deauth 1 -a //<CLIENT_MAC_ADDRESS>// wifi1mon 42 | 43 | **# To Deauth everyone on a network (For capturing reconnects/handshakes)** 44 | $ aireplay-ng --deauth 100 -a //<AP_MAC_ADDRESS> //wifi1mon 45 | 46 | 47 | == Aircrack-ng == 48 | **# Is the main tool in the Suite. It is used to crack passwords statically for WEP or dictionary cracks** 49 | **# on WPA2 once the handshake is captured. ** 50 | **# Password lists (wordlist) can be found here; **https://wiki.skullsecurity.org/Passwords 51 | 52 | **# Once you have a handshake, try and crack a password with (dictionary)** 53 | $ aircrack-ng //path/to/cap/file// -w ///path/to/wordlist// 54 | 55 | 56 | == Airdecap-ng == 57 | **# Is used to decrypt the traffic on a network. Once we have the password we are able to decrypt** 58 | **# everyone's traffic to the Access Point. ** 59 | 60 | 61 | == Airtun-ng == 62 | **# Is tools to set up a virtual tunnel that will monitor specified packages on a network and connects** 63 | **# to an IDE (like Snort) that can alert us. ** 64 | 65 | 66 | == Airolib-ng == 67 | **# Stores or manages ESSID and password lists that will help us speed up WPA/WPA2 password cracking.** 68 | 69 | 70 | == Airbase-ng == 71 | **# Is used to turn our system into a AP - for tricking clients into associating with our machine instead** 72 | **# of the real AP.** 73 | -------------------------------------------------------------------------------- /clamav.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-04T18:29:41+01:00 4 | 5 | ====== clamav ====== 6 | Created søndag 04 december 2016 7 | 8 | == Installation == 9 | $ pacman -S clamav 10 | 11 | == Update == 12 | **# Update the virus definitions after installation** 13 | **# NOTE! This must be done the first time, BEFORE enabling the service.** 14 | $ freshclam 15 | 16 | **# Enable clam update service, so clamav will always have the latest virus definitions** 17 | $ systemctl enable freshclamd.service 18 | 19 | == Additional virus definition/databases == 20 | **# Install some un-official virus definitions as well** 21 | $ yaourt -S clamav-unofficial-sigs 22 | 23 | == Test clamav == 24 | **# Make sure your clamav and its definitions are installed correct (harmless file)** 25 | $ curl http://www.eicar.org/download/eicar.com.txt | clamscan - 26 | 27 | **# The output must include ** 28 | stdin: Eicar-Test-Signature FOUND 29 | 30 | 31 | == Usage == 32 | **# Scan a file** 33 | $ clamscan //<FILE_NAME>// 34 | 35 | **# Scan a directory** 36 | $ clamscan -r -i ///path/to/folder// 37 | 38 | **# Scan entire system** 39 | $ clamscan -r -i --exclude-dir='^/sys|^/dev' / 40 | 41 | 42 | ===== Troubleshoot ===== 43 | **# Lord know there's been a few..** 44 | 45 | == Clamd was not notified on freshclam == 46 | **# When I tried to run **//freshclam//** it failed. The following should be the solution.** 47 | **# Add a sock file for clamd ** 48 | $ touch /var/lib/clamav/clamd.sock 49 | $ chown clamav:clamav /var/lib/clamav/clamd.sock 50 | 51 | **# Then Edit **///etc/clamav/clamd.conf //**and uncomment the following line** 52 | {{{code: lang="texinfo" linenumbers="True" 53 | LocalSocket /var/lib/clamav/clamd.sock 54 | }}} 55 | 56 | -------------------------------------------------------------------------------- /i3.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-18T03:20:18+01:00 4 | 5 | ====== i3 ====== 6 | Created søndag 18 december 2016 7 | 8 | ===== Installation ===== 9 | **# Local configurations for many of these applications can be found at Github ** 10 | 11 | == FROM THE OFFICIAL REPOSITORY == 12 | **# Install the **//i3//** package group** 13 | $ pacman -S i3 14 | 15 | **# **//dmenu//** will launch applications on the fly. Here is a nice drop-in for **//dmenu// 16 | $ pacman -S rofi 17 | 18 | **# My logout script requires **//polkit //**too (Github)** 19 | $ pacman -S polkit 20 | 21 | **# An Authentication Agent helps authenticate the user, and is a common thing in DEs.** 22 | $ pacman -S polkit-gnome 23 | 24 | **# For the **//$mod+l//** lock screen you need **//imagemagick//** and **//scrot// **(Github)** 25 | **# You also need a icon (**https://www.iconfinder.com**) and correct it in the **//i3 //**config.** 26 | $ pacman -S imagemagick scrot 27 | 28 | **# (Statusbar) The temp. indicator in the statusbar needs **//lm-sensors// 29 | $ pacman -S lm_sensors 30 | 31 | **# (Statusbar) Battery indicator needs **//ACPI// 32 | $ pacman -S acpi 33 | 34 | **# (Statusbar) CPU monitor needs **//sysstat// 35 | $ pacman -S sysstat 36 | 37 | == FROM THE AUR == 38 | **# You need the **//i3blocks//** for your i3status bar** 39 | $ yaourt -S i3blocks 40 | 41 | **# **//i3-gaps//** are needed to make a gap between windows, when there's more than 1 window** 42 | $ yaourt -S i3-gaps 43 | 44 | **# The screen locker needs **//xss-lock//** (auto lock/ 10min.)** 45 | **# You can change the background image for the lockscreen in the **//i3//** config** 46 | $ yaourt -S xss-lock-git 47 | 48 | **# You need **//font-awesome//** to display icons in the workspace bar ** 49 | $ yaourt -S ttf-font-awesome 50 | 51 | == NOTE == 52 | **#** **Also install the ttf-font-package that you chose and correct in **//i3//** config.** 53 | 54 | 55 | ===== Configuration ===== 56 | **# A complete user guide for **//i3//** can be fount at **https://i3wm.org/docs/userguide.htm 57 | **# Launch **//i3//** on login with **xinitrc**. Add the following to your **//~/.xinitrc//** file.** 58 | {{{code: lang="texinfo" linenumbers="True" 59 | exec i3 60 | }}} 61 | 62 | 63 | **# First time **//i3//** is run it'll provide you with a configuration wizard. ** 64 | **# Quit the wizard and copy your config to **//~/.config/i3/config// 65 | 66 | == i3status == 67 | **# Local **//i3status//** configuration at Github.** 68 | **# This file is read from **//~/.config/i3status/config //**(can be defined in **//i3//** configuration)** 69 | **# A default version of this file can be fount at **///etc/i3status.conf// 70 | 71 | == Getting Window Information == 72 | **# Should you change your applications and want information for key-binding etc** 73 | **# Install the **//xorg-xprop//** package** 74 | $ pacman -S xorg-xprop 75 | 76 | **# Run **//xprop//** and watch your cursor turn into a corsair. ** 77 | **#** **Now click the Window you want information about.** 78 | **# The **//WM_CLASS(STRING) = "Navigator", "Firefox" //**(etc) is probably what you are looking for.** 79 | 80 | == Icons in Workspace bar == 81 | **# You should have the **//font-awesome//** package installed.** 82 | **# A nice cheat-sheet for these icons can be found here **http://fontawesome.io/cheatsheet/ 83 | **# Then just copy the icon you'd like into the string in the configuration file.** 84 | 85 | ===== Saving & Restoring Workspace Layout ===== 86 | **# Requires **//perl-anyevent-i3//** and **//perl-json-xs// 87 | $ pacman -S perl-anyevent-i3 perl-json-xs 88 | 89 | == Save Workspace Layout == 90 | **# Navigate to the workspace ** 91 | **# Then open and arrange the programs the way you'd like it to be restore** 92 | **# Then save that layout to a json file.** 93 | **#** //N//** = workspace (numeric).** 94 | $ i3-save-tree --workspace //N// > ~/dotfiles/.config/i3/layouts/workspace_//N//.json 95 | 96 | **# Once the workspace files has been created, they need to be edited** 97 | **# Open it with your favorite editor and look for the following ** 98 | {{{code: lang="texinfo" linenumbers="True" 99 | "swallows": [ 100 | { 101 | // "class": "", 102 | // "instance": "", 103 | // "title": "", 104 | // "transient_for": "" 105 | } 106 | ] 107 | }}} 108 | 109 | 110 | **# We just need **//class//** and **//instance//** so remove the bottom two lines and comment out the two needed** 111 | **# Also note the trailing , (comma) after **//instance//** - remove this too** 112 | {{{code: lang="texinfo" linenumbers="True" 113 | "swallows": [ 114 | { 115 | "class": "", 116 | "instance": "" 117 | ] 118 | }}} 119 | 120 | 121 | **# Note, that the **//instance//** variable is for named windows. ** 122 | **# You could ex specify something like; **//"instance": "Special"// 123 | **# Now only windows open with the name **//Special//** will correspond. Ex; **//urxvt -name Special// 124 | 125 | 126 | == Load Workspace Layout == 127 | **# Once the workspace layout has been saved (as showed above), ** 128 | **# create a script that will load the layout and run the applications** 129 | **# Change**// N//** accordingly; **//~/dotfiles/.config/i3/layouts/load_workspace_N.json// 130 | {{{code: lang="texinfo" linenumbers="True" 131 | #!/bin/bash 132 | # First we append the saved layout to the workspace - Change N accordingly 133 | i3-msg "workspace N; append_layout ~/dotfiles/.config/i3/layouts/workspace_N.json" 134 | 135 | # Then run the programs, Ex 136 | (urxvt &) 137 | (firefox &) 138 | (zim &) 139 | }}} 140 | 141 | 142 | **# Make the Shell files **executable 143 | $ chmod u+x ~/.config/i3/layouts/load_layout_//N//.sh 144 | 145 | **# You can now run the Shell scripts - or add them to your **//i3//** config** 146 | 147 | -------------------------------------------------------------------------------- /i3_mapping.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-31T02:58:51+01:00 4 | 5 | ====== i3 mapping ====== 6 | Created søndag 18 december 2016 7 | 8 | **# This is based on my personal key-bindings. My **//i3//** .dotfile can be found at Github.** 9 | **# My **//$mod//**-key is set to Super-key.** 10 | 11 | == System == 12 | **# To reload the configuration file **//$mod+Shift+c// 13 | **# To restart i3 in place **//$mod+Shift+r// 14 | **# Log out/ shutdown options **//$mod+Shift+e// 15 | **# HDMI controls with **//$mod+p// 16 | 17 | **# To open the terminal **//$mod+Enter// 18 | **# Open Firefox with **//Alt+w// 19 | **# To open dmenu **//Alt+d// 20 | 21 | == Navigation == 22 | **# Float a window with **//$mod+Shift+Space// 23 | **# To switch focus between Tiling and Floating containers, use **//$mod+Space// 24 | 25 | **# Move around in the Window-three with **//$mod+Arrow-keys// 26 | **# Move to Urgent Window with **//$mod+x// 27 | 28 | **# Toggle Horizontal and Vertical window tiling with **//$mod+v// 29 | 30 | **# Change the container layout (stacked, tabbed or split)** 31 | **# Stacking = **//$mod+s// 32 | **# Tabbed = **//$mod+w// 33 | **# Split = **//$mod+e// 34 | 35 | **# Move to workspaces with **//$mod+1,2,3 etc// 36 | **# Further more, you can drag a container along back and forth with **//$mod+z// 37 | 38 | **# Navigate back and forth between the last two containers **//Alt+<tap>// 39 | 40 | == Scratchpad == 41 | **# Scrachpad is a hidden workspace. ** 42 | **# Items from the Scrachpad can be pulled to your currently working workspace - a floating window.** 43 | **# This feature is good for quickly taking notes etc. ** 44 | 45 | **# Move focused window to Scratchpad : **//$mod+m// 46 | **# Focus Scrachpad container : **//$mod+o// 47 | 48 | == Containers == 49 | **# To kill focused container **//$mod+Shift+q// 50 | **# To make a container fullscreen **//$mod+f// 51 | 52 | **# To move a container to a different workspace, use **//$mod+Shift+1,2,3 etc.// 53 | 54 | **# Resize a container with **//$mod+r//** this will enter resize mode. ** 55 | **#** **Use the arrow keys and hit ESC when satisfied.** 56 | -------------------------------------------------------------------------------- /journalctl.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-04T17:31:19+01:00 4 | 5 | ====== journalctl ====== 6 | Created søndag 04 december 2016 7 | 8 | **The Journalctl is Arch's logging journal. ** 9 | 10 | ===== Usage ===== 11 | **# A few ways to invoke the Journal** 12 | 13 | == Select boot == 14 | **# You can select which boot you've like to see information from. ** 15 | $ journalct -b 16 | 17 | **# **//-b//** is the same as **//-b -0// 18 | **# To show from previous boot, use **//-b -1// 19 | **# And the second previous, **//-b -2// 20 | **# etc etc.** 21 | 22 | == Show end of the Jourmal == 23 | **# Use **//-x//** to view the latest entries in the journal** 24 | $ journalctl -xb 25 | 26 | == Display since .. minutes == 27 | **# Ex to display all messages within the last 20 minutes** 28 | $ journalctl --since "20 min ago" 29 | 30 | == Follow new messages == 31 | **# To follow the journal for new entries** 32 | $ journalctl -f 33 | 34 | 35 | ===== Tips and Tricks ===== 36 | **# Some random Tips and Tricks** 37 | 38 | == Wordwrap the output of journalctl == 39 | **# By default, journalctl truncates the text (off the terminal display) ** 40 | **#** **You can instead make it wordwrap the output** 41 | $ SYSTEMD_LESS=FRSXMK journalctl 42 | 43 | == Reduce log size == 44 | **# We don't want our log to take 5% disc-space. ** 45 | **#** **Edit **///etc/systemd/journald.conf//**, uncomment and set the **//SystemMaxUse// 46 | {{{code: lang="texinfo" linenumbers="True" 47 | SystemMaxUse=50M 48 | }}} 49 | 50 | 51 | **# Then reduce the current journal to 50M** 52 | $ journalctl --vacuum-size=50M 53 | -------------------------------------------------------------------------------- /ls.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T13:43:45+02:00 4 | 5 | ====== ls ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | $ ls ///path/to/folder// 9 | $ ls -a **# Display hidden files too** 10 | $ ls -l **# File owner and permissions** 11 | 12 | == Output with -l == 13 | drwxr-xr-x 2 stick stick 4096 15.10.2016 17:25 Desktop/ 14 | drwxr-xr-x 7 stick stick 4096 03.10.2016 14:52 Documents/ 15 | drwxr-xr-x 6 stick stick 4096 16.10.2016 10:02 Downloads/ 16 | etc. 17 | 18 | **# The **//drwxr-xr-x//** is the **//file-type//** and the **//permissions//**, followed by the **//user//** and **//group//**.** 19 | **[file type] [user] [group] [others] user group** 20 | d rwx r-x r-x stick stick 21 | 22 | 23 | == File types == 24 | **# Explanation of all values** 25 | $ info ls -n "What information is listed" 26 | 27 | ( - ) **= normal file** 28 | ( d ) **= directory** 29 | ( l ) **= symbolic** 30 | 31 | == Permissions == 32 | **# Each user, group and other has 3 characters that defines their permissions,** rwx **etc.** 33 | | | | | 34 | |:----------------|:-----------------------|:--------------------| 35 | | First letter : | - = cannot be read, | r = read access | 36 | | Second letter : | - = cannot be modified | w = can be modified | 37 | | Third letter : | - = cannot be executed | x = executable | 38 | 39 | -------------------------------------------------------------------------------- /lynis.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-16T23:54:35+01:00 4 | 5 | ====== lynis ====== 6 | Created fredag 16 december 2016 7 | 8 | **Lynis will perform a security audit in several areas. It has a simple usage and a nice thorough output/result.** 9 | 10 | == Installation == 11 | $ pacman -S lynis 12 | 13 | ===== Usage ===== 14 | **# Lynis will perform a scan and give you advice on how to improve security. ** 15 | 16 | == Audits == 17 | **# Perform a local security scan** 18 | $ lynis audit system 19 | 20 | **# To perform a remote security scan** 21 | $ lynis audit remote //<HOST>// 22 | 23 | == Options == 24 | **# Additional options may be found by doing ** 25 | $ lynis --help 26 | 27 | **# Non-privileged scan (useful for pentest)** 28 | $ lynis audit remote //<HOST> //--pentest 29 | -------------------------------------------------------------------------------- /monero.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-17T14:15:54+01:00 4 | 5 | ====== monero ====== 6 | Created lørdag 17 december 2016 7 | 8 | **Monero is a crypto currency, that we are still able to mine with our limping hardware^** 9 | **Mine the monero currency and change them into BitCoin - That is the plan. ** 10 | 11 | == Installation == 12 | **# Can be found in the AUR** 13 | $ yaourt -S bitmonero-git 14 | 15 | == Syncing the blockchain == 16 | **# You need to import and sync the blockchain. ** 17 | $ monerod 18 | 19 | **# It'll take some time^** 20 | **# Once updated, leave the daemon running. ** 21 | **#** **Good for the community and your wallet needs fully synced chain anyways (when running).** 22 | 23 | == Creating your wallet == 24 | **# When creating a new wallet, you will be put through a configuration wizard for a password etc.** 25 | $ mkdir ~/.monero_wallet 26 | $ cd ~/.monero_wallet 27 | $ monero-wallet-cli 28 | 29 | **# The monero wallet will start to refresh** 30 | **# If it fails on its way, make sure the monerod (daemon) is running ** 31 | **#** **and enter **//refresh//** to start refreshing again.** 32 | 33 | **# Once your wallet i refreshed, save it** 34 | $ save 35 | 36 | == Using your wallet == 37 | **# Start the monero daemon (needs to run in order for the wallet to work)** 38 | $ monerod 39 | 40 | **# and navigate to your wallet folder to run it ** 41 | $ cd ~/.monero_wallet 42 | $ monero-wallet-cli 43 | 44 | **# This will prompt your first to enter the name of your wallet (chosen in the conf-wizard)** 45 | **# Then your password. Once succeeded, your wallet will be displayed. ** 46 | 47 | **# To view your public address** 48 | $ address 49 | 50 | **# To view your balance** 51 | $ balance 52 | 53 | **# To send money** 54 | $ transfer //<address> <amount>// 55 | 56 | == Mining == 57 | **# To mine monero coins you'll have to mine with a pool. ** 58 | **# To first monero mining pools seems to have a 100% donation rate, which is nice.** 59 | **# They take a little higher fee though (1.9%), but it goes to a good cause I guess.** 60 | **# This pool can be found at **https://moneropool.com 61 | 62 | **# You will also need a mining software ** 63 | **#** **(THIS IS A CPU MINER. There is also GPU miners)** 64 | $ yaourt -S cpuminer-multi 65 | 66 | **# To start mining** 67 | $ cpuminer -a cryptonight -o stratum+tcp://mine.moneropool.com:3333 -u //<YOUR_WALLET_ADDRESS>// -p x 68 | -------------------------------------------------------------------------------- /mplayer.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-31T21:36:55+01:00 4 | 5 | ====== mplayer ====== 6 | Created mandag 31 oktober 2016 7 | 8 | **Install the **//mplayer //**package** 9 | $ pacman -S mplayer 10 | 11 | **mplayer keyboard actions** 12 | | Key | Descriptions | 13 | |:------------|:--------------------------------------------------| 14 | | Space | Toggle pause/play | 15 | | Backspace | Return to menu when you are using dvdnav | 16 | | Left arrow | Back ten seconds | 17 | | Right arrow | Forward ten seconds | 18 | | Down arrow | Back one minut | 19 | | Up arrow | Forward one minut | 20 | | < | Back in playlist | 21 | | > | Forward in playlist | 22 | | m | Mute sound | 23 | | 9,0 | Volume down/up | 24 | | 1,2 | Adjust contrast | 25 | | 3,4 | Adjust brightness | 26 | | f | Toggle fullscreen | 27 | | o | Toggle OnScreen Display (playtime/ time left etc) | 28 | | v | Toggle subtitle visibility | 29 | | I (big i) | Show filename | 30 | | j | Cycle available subtitles | 31 | | # | Cycle available audio tracks | 32 | 33 | 34 | 35 | == Creating and Playing playlists == 36 | **You can create a playlist by navigating to the directory where the intended files are stored. The run : ** 37 | $ find -maxdepth 1 -type f -name \*.//mkv// | sort > playlist 38 | 39 | **This will create a sorted file called **//playlist//** with all the **//mkv// **files in the directory. ** 40 | **Change the **//mkv//** part if the file format differs. If files extension differs, you can use **//\*.*// 41 | **To use the playlist, append the **//-playlist//** option : ** 42 | $ mplayer -playlist playlist 43 | 44 | == Browser Integration == 45 | **Mplayer can control the video viewing in your browser. The **//gecko-mediaplayer//** package provides this feature for both Firefox and Chromium. The **//gecko-mediaplayer//** package depends on **//gnome-mplayer//** package, which is a GTK front end for mplayer.** 46 | 47 | **# Install the two packages : ** 48 | $ pacman -S gnome-mplayer gecko-mediaplayer 49 | 50 | == Resume from where you last left off == 51 | **There is a mplayer wrapper which can be invoked whenever you want to resume a move from where you last stopped.** 52 | 53 | **Install the wapper **//mplayer-resumer// (AUR) **package** **and invoke it with ** 54 | $ mplayer-resumer //options path/to/file// 55 | 56 | == Allowing Framedrops == 57 | **Allowing framedrops will increase fps on slower systems, but at the cost of quality. It'll allow a frame to be dropped here and there. To allow framedrops, run mplayer with the **//-framedrop //**option : ** 58 | $ mplayer -framedrop ///path/to/file// 59 | 60 | == Watching streamed links == 61 | **You can use the **//-playlist//** option to play e.g. ASK links** 62 | $ mplayer -playlist //link-to-stream.asx// 63 | 64 | == Taking screenshots == 65 | **It is possible to take either a single sc or multiple sc's by appending the **//-vf screenshot //**option : ** 66 | $ mplayer -vf screenshot //filename.mkv// 67 | 68 | **This will allow you to press 's' to take a single screenshot, or 'S' to take multiple screenshots until 'S' is pressed again.** 69 | **The files (PNG) will be stored in the current working directory.** 70 | 71 | -------------------------------------------------------------------------------- /netctl.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-31T14:41:00+01:00 4 | 5 | ====== netctl ====== 6 | Created mandag 31 oktober 2016 7 | 8 | **Netctl is a network configuration tool that works with profiles stored in **///etc/netctl// 9 | 10 | ===== WIFI ===== 11 | **# Setting up wifi requires one to create a profile for the network - then start/enable it.** 12 | 13 | == Creating Profiles == 14 | **# A basic example, of a profile, is stored in** ///etc/netctl/example// 15 | 16 | **#** **Using dialog ( wifi-menu ) ** 17 | $ wifi-menu -o **# Automatically generates a profile in **///etc/netctl// 18 | 19 | == General Usage == 20 | **# Start the profile ** 21 | $ netctl start //<PROFILE_NAME> //**# Profile refers to a saved profile in** ///etc/netctl// 22 | 23 | **# Stop the profile ** 24 | $ netctl stop //<PROFILE_NAME>// 25 | 26 | **# Reenable the profile ** 27 | $ netctl reenable //<PROFILE_NAME>// 28 | 29 | ==== Automatic Connection on System Logon ==== 30 | **#** **The **//wpa_actiond//** packages is actually for automatically switching profiles** 31 | **# when moving from on saved hotspot to another saved hotspot.** 32 | **#** **This package can also be used to automatically connect to a profile when logging on though.** 33 | 34 | **#** **Install the **//wpa_actiond//** package ** 35 | $ pacman -S wpa_actiond 36 | 37 | **#** **Enable with systemd ** 38 | $ systemctl enable netctl-auto@wlp2s0.service **# You can get your device name with** //iw dev// 39 | 40 | **# To reconnect a network, restart the service** 41 | $ systemctl restart netctl-auto@wlp2s0.service 42 | 43 | == General Usage == 44 | **# To get a complete list of options, run** //netctl-auto --help //**The list is short^** 45 | 46 | **# List all profile** 47 | $ netctl-auto list **# If there is a * in front of the profile, it means this is the connected profile** 48 | 49 | == Good-to-Know == 50 | **#** **Disable auto-connect for a specific profile** 51 | **#** **You can exclude a profile from auto-connecting, by editing the profile in **///etc/netcl//** and adding ** 52 | {{{code: lang="texinfo" linenumbers="True" 53 | ExcludeAuto=yes 54 | }}} 55 | 56 | 57 | 58 | ===== Ethernet ===== 59 | **# There should probably be a more thorough guide for the Ethernet.. Maybe later^** 60 | 61 | ==== Tips and Tricks ==== 62 | **# Some random Tips and Tricks** 63 | 64 | == Ethernet cable hotplug == 65 | **#** **You can bring a device up/down upon ethernet cable insertion/removal with the **//ifplugd //**package** 66 | $ pacman -S ifplugd 67 | 68 | **#** //Ifplugd//** default configuration file can be found at **///etc/ifplugd/ifplugd.conf // 69 | **#** **note: default device is **//eth0// 70 | 71 | **#** **Enable the service ** 72 | $ systemctl enable netctl-ifplugd@wlp2s0.service 73 | 74 | 75 | -------------------------------------------------------------------------------- /nmap.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-11T14:36:12+01:00 4 | 5 | ====== nmap ====== 6 | Created søndag 11 december 2016 7 | 8 | == Installation == 9 | $ pacman -S nmap 10 | 11 | ===== Usage ===== 12 | **# Some basic usage for full blown mad-man, and the bit more discreet approaches.** 13 | 14 | == Some basics - be aware that these might be easily spotted by FW/IDS == 15 | **# Scan for open ports (**//verbose//**), use double for extra verbose **//-vv// 16 | $ nmap -v //host// 17 | 18 | **# Get OS** 19 | $ nmap -A <//host>// 20 | 21 | **# To scan for a specific port on an entire network (**//-p//** to define port)** 22 | **# Example for port 22, default SSH** 23 | $ nmap -p 22 192.168.0.* 24 | 25 | **# Comprehensive scan** 26 | **# **//-g 53 //**to use port 53 (**//DNS//**) which has better chance of being allowed** 27 | $ nmap -sS -n -sU -T4 -A -v -PE -PP -PS -PA -PU -PY -g 53 //<host>// 28 | 29 | **# Normal quick scan** 30 | **# **//-T4 //**is pretty fast scan - you can use **//-T2//** to slow it down** 31 | **# **//-n//** is no DNS resolution, and **//-Pn//** is to treat all hosts as online (skip host discovery) ** 32 | $ nmap -T4 -n -A -v -Pn //<host>// 33 | 34 | **# We can check if the server is using packet filtering with **//-PN// 35 | $ nmap -PN //<host>// 36 | 37 | **# Check host and interface** 38 | $ nmap --iflist //<host>// 39 | 40 | **# Some firewalls blocks PING requests, check it with TCP ACK and Syn packets** 41 | $ nmap -PS //<host>// 42 | 43 | == Evading FW/IDS == 44 | **# Do **//ACK //**scan instead of the **//SYN//** scan** 45 | $ nmap -sA <//host>// 46 | 47 | **# nmap will produce one of the these four responses** 48 | Open port **(few will be the case if encountered a FW)** 49 | Closed port **(most ports are closed due to the FW)** 50 | Filtered **(not able to determine if open or not)** 51 | Unfiltered **(can access but is still uncertain if open or closed)** 52 | 53 | **# In case of **//unfiltered//** you can try a **//TCP Window//** scan.** 54 | **# Very similar to **//ACK//** but designed to diferentiate between open and closed ports** 55 | $ nmap -sW <//host>// 56 | 57 | **# Should give you **//Filtered//** or **//Closed// 58 | 59 | **# You can also try and sent fragment packets with **//-f// 60 | **# To further break down packets, use double **//-ff// 61 | $ nmap -ff <//host>// 62 | 63 | **# **//nmap//** allows you to spoof a random vendor MAC -** 64 | **#** **This will make it hard to determine where the attack came from.** 65 | **# **//nmap //**has a db with vendor prefixes, so whenever you provide a vendor, ** 66 | **#** **it looks in the db for a suitable MAC.** 67 | $ nmap -spoof-mac Cisco <//host>// 68 | 69 | **# Unit and value rules for the next two examples.** 70 | 5ms** = 5milliseconds)** 71 | 5s** = 5 seconds** 72 | 5m **= 5 minutes** 73 | 5h **= 5 hours** 74 | 75 | **# To not stress a network, you can delay the scans - specialy effective on larger networks.** 76 | $ nmap -scan_delay 5s //host// 77 | 78 | **# Sometimes a host might take a long time to respond - can be due to FW ex.** 79 | **# If you don't want to waste your time, set a timelimit per host** 80 | $ nmap -host-timeout 5s <//host>// 81 | 82 | == Scripting == 83 | **# Scripts can be fount in **///usr/share/nmap/scripts///** and has the **//.nse //**extension.** 84 | **# **//nmap//** has a shit-load of scripts - here is some of the best.** 85 | **# **//-sV//** scans for apps on ports** 86 | 87 | **# Check for vulnerabilities** 88 | $ nmap -sV -script=smb-check-vulns <//host>// 89 | 90 | **# This will check for one of the following vulnerabilities** 91 | MS08-067 Windows vulnerability that can be exploited 92 | Conficker malware on the target machine 93 | Denial of service vulnerability of Windows 2000 94 | MS06-025 Windows 95 | MS07-029 Windows 96 | 97 | **# You can scan a website directory with **//http-enum// 98 | **# This is also used to scan for open ports and the software with their version on each port** 99 | $ nmap -sV -script=http-enum <//host>// 100 | 101 | **# There is a Samba heap overflow vulnerability **//CVE-2012-1182//**, scan for it with the following** 102 | $ nmap -script=samba-vuln-cve-2012-1182 -p 139 //<host>// 103 | 104 | **# Alot of companies are not running their SMTP on the default port. ** 105 | **# **//smtp-strangeport //** is a script to determine if the SMTP is running on the standard port or not,** 106 | $ nmap -sV -script=smtp-strangeport //<host>// 107 | 108 | **# We can get the PHP version with **//http-php-version// 109 | $ nmap -sV -script=http-php-version //<host>// 110 | 111 | **# There is several WordPress scripts** 112 | http-wordpress-plugins 113 | http-wordpress-enum 114 | http-wordpress-brute 115 | 116 | **# To find blacklisted IP addresses** 117 | $ nmap -sn //<host> //-script=dns-blacklist 118 | 119 | -------------------------------------------------------------------------------- /notebook.zim: -------------------------------------------------------------------------------- 1 | [Notebook] 2 | version=0.4 3 | name=Arch (linux) 4 | interwiki= 5 | home=Home 6 | icon= 7 | document_root= 8 | shared=True 9 | endofline=unix 10 | disable_trash=False 11 | profile= 12 | 13 | -------------------------------------------------------------------------------- /rxvt-unicode.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-01-15T04:20:24+01:00 4 | 5 | ====== rxvt-unicode ====== 6 | Created Sunday 15 January 2017 7 | 8 | **rxvt-unicode (URxvt) is a terminal emulator that a.a. supports extensions and multiple fonts2. ** 9 | 10 | == Installation == 11 | **# Install the Terminal** 12 | $ pacman -S rxvt-unicode 13 | 14 | == Extensions == 15 | **# The Extensions are all included in my configuration file (Github) - see further down for more information** 16 | 17 | **# Change fonts on the fly** 18 | $ yaourt -S urxvt-resize-font-git 19 | 20 | **# For Vi-like navigation in Terminal ** 21 | $ pacman -S urxvt-perls 22 | 23 | == Configuration == 24 | **# URxvt reads its configuration from **//~/.Xresources //**(Github)** 25 | 26 | 27 | ===== Extensions ===== 28 | **# URxvt accepts perl extensions ** 29 | **# Add them to your **//.Xresources//** - extensions should NOT be space separated!** 30 | {{{code: lang="texinfo" linenumbers="True" 31 | URxvt.perl-ext-common: extension_name_1,extension_name_2,... 32 | }}} 33 | 34 | 35 | **# Here is some of the favorites;** 36 | 37 | == Resize Font == 38 | **# Add**// resize-font//** to the extension list (extension)** 39 | **# Resize with **//Ctrl+Up/Down// 40 | 41 | == Clipboard instead of Primary == 42 | **# Add **//selection_to_clipboard//** for **//Ctrl+Shift+c/v//** to/from primary clipboard** 43 | 44 | == urxvt-perls (Keyboard-select/ Vi-like behavior) == 45 | **# Add **//keyboard-select //**to the extension list (extension)** 46 | **# Use with;** 47 | **#** h j k l **=** **Move cursor left/down/up/right (also with arrow keys)** 48 | **#** g G 0 ^ $ H M L f F ; , w W b B e E **=** **More vi-like cursor movement keys** 49 | **#** / ? **=** **Start forward/backward search** 50 | **#** n N **= Repeat last search, N: in reverse direction** 51 | **#** Ctrl+f/b **= Scroll down/up one screen** 52 | **#** Ctrl+d/u **=** **Scroll down/up half a screen** 53 | **#** v V Ctrl-v **=** **Toggle normal/linewise/blockwise selection** 54 | **#** y Return **=** **Copy selection to primary buffer, Return: quit afterwards** 55 | **#** Y **=** **Copy selected lines to primary buffer or cursor line and quit** 56 | **#** q Escape **= Quit keyboard selection mode** 57 | 58 | -------------------------------------------------------------------------------- /scp.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-03T15:47:15+01:00 4 | 5 | ====== scp ====== 6 | Created lørdag 03 december 2016 7 | 8 | **# scp will allow you to transfer to, or download from, a remote SSH server.** 9 | **# It works in contrast with Unix **//cp//** command ** 10 | **# So you specify where the file you want copied, to where you want the file copied to** 11 | 12 | **# To specify the hosts filesystem **//[user] //**@ **//[host] //**: **///path/to/folder// 13 | 14 | == Basic Examples == 15 | **# Copy a single file to a remote server** 16 | $ scp //path/to/file <username>//@//<server-adress>//:///path/to/folder// 17 | 18 | **# To copy a single file from the remote server to your home folder (ex)** 19 | $ scp //<username>//@//<server-adress>//:///path/to/file /path/to/folder// 20 | 21 | 22 | == Basic folder and files handling == 23 | **# In below examples, we'll use **//[host]//** instead of the **//<username>//@//<server-adress>//:///path/to/folder //**string** 24 | **# You can specify multiple files in a space seperated list** 25 | $ //file1 file2 file3 /path/to/file4 [host]// 26 | 27 | **# Specific (all) file types** 28 | **# Use the typical regex * (star) sorting. F.ex. all **//.txt //**files.** 29 | $ [host]:/path/to/*.txt //path/to/folder/// 30 | 31 | **# Recursive ** 32 | **# Use **//-r//** (recursive) to download/upload all the folder content, ex.** 33 | $ scp -r ~/path/to/folder [host] 34 | -------------------------------------------------------------------------------- /screenshot_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stickano/ArchCheatSheet/5115e16492fcc547910495411130d7d653b1eb46/screenshot_play.png -------------------------------------------------------------------------------- /sed.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-10-22T14:17:55+02:00 4 | 5 | ====== sed ====== 6 | Created lørdag 22 oktober 2016 7 | 8 | **sed is a tool for manipulation text.** 9 | 10 | == Spacing == 11 | **# Double spaces (doesn't make double blank lines)** 12 | $ sed '/^$/d;G' 13 | 14 | **# Undo double spacing** 15 | $ sed 'n;d' 16 | 17 | **# Insert blank line above lines matching example** 18 | $ sed '/example/{x;p;x;}' 19 | 20 | **# Insert blank line below lines matching example** 21 | $ sed $'s/regexp/\\\n/wqg' 22 | 23 | **# Insert blank line below and above lines matching example** 24 | $ sed '/example/{x;p;x;G;}' 25 | 26 | **# Add a blank line after every 5 lines** 27 | $ sed 'n;n;n;n;G;' 28 | 29 | == Line numbering == 30 | **# Line number for each line** 31 | $ sed = filename | sed 'N;s/\n/\t/' 32 | 33 | **# Only if the line is not empty** 34 | $ sed '/./=' filename | sed '/./N; s/\n/ /' 35 | 36 | == Whitespaces == 37 | **# Remove whitespaces from beginning of each line** 38 | $ sed 's/^[ \t]*//' 39 | 40 | **# Remove whitespaces from end of each line** 41 | $ sed 's/[ \t]*$//' 42 | 43 | **# Remove whitespace from beginning and end of each line** 44 | $ sed 's/^[ \t]*//;s/[ \t]*$//' 45 | 46 | == Find and Replace == 47 | **# Find and replaces all instances of foo and replaces it with bar** 48 | $ sed 's/foo/bar/g' 49 | 50 | == Reverse == 51 | **# Re-arrange the lines (bottom to top)** 52 | $ sed '1!G;h;$!d' 53 | 54 | **# Reverse each character** 55 | $ sed '/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/.//' 56 | 57 | == Selective Printing == 58 | **# Print out first line of a file** 59 | $ sed q 60 | 61 | **# Print out first 10 lines of a file** 62 | $ sed 10q 63 | 64 | **# Print out last 10 lines of a file** 65 | $ sed -e :a -e '$q;N;11,$D;ba' 66 | 67 | **# Print out lines witch contains example** 68 | $ sed -n '/example/p' 69 | 70 | **# Print out lines that does NOT contain example** 71 | $ sed -n '/example/!p' 72 | 73 | **# Print out line 8 to 12** 74 | $ sed -n '8,12p' 75 | 76 | **# Print out line 52** 77 | $ sed -n '52p' 78 | 79 | == Deleting == 80 | **# Delete all duplicate lines (consecutive duplicates)** 81 | $ sed '$!N; /^\(.*\)\n\1$/!P; D' 82 | 83 | **# Delete the first 10 lines** 84 | $ sed '1,10d' 85 | 86 | **# Delete the last line** 87 | $ sed '$d' 88 | 89 | **# Delete every 8th line** 90 | $ sed 'n;n;n;n;n;n;n;d;' 91 | 92 | **# Delete lines containing example** 93 | $ sed '/example/d' 94 | 95 | **# Delete all blank lines** 96 | $ sed '/^$/d' 97 | -------------------------------------------------------------------------------- /sudo.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2016-12-30T01:24:35+01:00 4 | 5 | ====== sudo ====== 6 | Created Friday 30 December 2016 7 | 8 | **By default, you aren't allowed to use the **//sudo//** command as a user. ** 9 | **Further more, running X applications with sudo is not possible by default.** 10 | **This is because, that root does not have access to the primary screen by default.** 11 | 12 | **# The sudoers configuration file is located at **///etc/sudoers//**. ** 13 | **# This file should always be edited with the visudo editor.** 14 | $ EDITOR=nano visudo 15 | 16 | == Enable user to use sudo == 17 | **# Edit the sudoers file** 18 | $ EDITOR=nano visudo 19 | 20 | **# And add the user** 21 | {{{code: lang="texinfo" linenumbers="True" 22 | stick ALL=(ALL) ALL 23 | }}} 24 | 25 | 26 | 27 | == Allow sudo to use X applications == 28 | **# Edit **///etc/profile//** and add the following line - remember to change **//username// 29 | {{{code: lang="texinfo" linenumbers="True" 30 | export XAUTHORITY=/home/<username>/.Xauthority 31 | }}} 32 | 33 | 34 | 35 | ===== Tips and Tricks ===== 36 | **# Some random Tips and Tricks** 37 | 38 | == Change password timeout == 39 | **# The default lets you use **//sudo//** commands in a 5min time span ** 40 | **# Let's change this to 30 - I am a bit slow sometimes..** 41 | $ EDITOR=vim sudo visudo 42 | 43 | **# And add the following ** 44 | {{{code: lang="texinfo" linenumbers="True" 45 | Defaults:stick timestamp_timeout=30 46 | }}} 47 | 48 | 49 | == Insult when the wrong password was entered == 50 | **# Add this line to the sudoers file** 51 | {{{code: lang="texinfo" linenumbers="True" 52 | Defaults insults 53 | }}} 54 | 55 | 56 | == Disable password for user == 57 | **# Be aware that this is not good practice ** 58 | **# Add to the sudoer file - change **//USER_NAME//** accordingly ** 59 | {{{code: lang="texinfo" linenumbers="True" 60 | Defaults:USER_NAME !authenticate 61 | }}} 62 | -------------------------------------------------------------------------------- /vim_mapping.txt: -------------------------------------------------------------------------------- 1 | ====== vim mapping ====== 2 | Created Saturday 07 January 2017 3 | 4 | **Vim editor works a bit different than other editors (I've used at least). ** 5 | **Vim works in a concept of modes - and you will not be able to type directly once you run it. ** 6 | **This is because Vim opens in its normal mode - not insert mode. ** 7 | **The normal mode allows you to push a key, and what-ever action bound to that key will be run.** 8 | 9 | ===== Command Mode ===== 10 | **# Commands can be entered by hitting : (colon) from Normal Mode** 11 | 12 | == Save and/or Exit == 13 | **# To save (write) **//:w// 14 | **# Save to specific file **//:w file_name// 15 | **# Save and Exit **//:x// 16 | **# Exit (quit) **//:q// 17 | **# (Save) Forgot to open document as sudo? Use **//:w!! //**(double exclamation)** 18 | 19 | == Find and Replace == 20 | **# Below examples will replace instances of **//original//** with **//replacement// 21 | **# Search and replace the first instance **//:%s/original/replacement// 22 | **# Search and replace all instances **//:%s/original/replacement/g// 23 | **# All instances, but confirm before replacing **//:%s/original/replacement/gc// 24 | 25 | == Change Color every 10sec == 26 | **# Use this little snippet **//:while 1|sleep 10|call NextColor(1)|endwhile// 27 | **# Stop it with **//Ctrl+c// 28 | 29 | 30 | ===== Normal mode ===== 31 | **# You can reach normal mode by hitting **//Esc//** at any time** 32 | **# In Normal Mode you just hit the key - or key combo - to activate the action attached** 33 | **#** **<leader> = , (comma) ** 34 | 35 | == Nerd Tree (file manager) == 36 | **# Open (plugin) file manager with **//Ctrl+n// 37 | **# To show Hidden files in NerdTree, hit **//I // 38 | 39 | == Insert Mode (edit content) == 40 | **# Insert mode (before cursor) **//i// 41 | **# Insert mode (before line) **//I// 42 | **# New line below, and enter Insert mode **//o// 43 | **# New line above, and enter Insert mode **//O// 44 | **# After Cursor **//a// 45 | **# End of line **//A// 46 | **# Replace 1 character **//r// 47 | **# Replace many characters **//R// 48 | 49 | == Deleting Text == 50 | **# Delete character at cursor **//x// 51 | **# Delete a word **//dw// 52 | **# Delete from cursor to end of line **//D// 53 | **# Delete line **//dd// 54 | **# Delete 3 lines (ex) **3dd 55 | 56 | == Undo Tree == 57 | **# A Git-like undo tree with **//F5// 58 | 59 | == Searching == 60 | **# Search forward **/ 61 | **# Search backwards **//?// 62 | **# Next result **//n// 63 | **# Previous result **//N// 64 | **# Clear Search (command) **//:noh //**# Modified to **//<leader>Space// 65 | 66 | == Searching for words under cursor == 67 | **# You can place your cursor at a word and hit **//* //**(star) to find next instance of that word.** 68 | **# To search backwards use **//#// 69 | 70 | == Matching parenthesis == 71 | **# You can navigate to a parenthesis and hit **//%//** to jump to the opening/closing parenthesis. ** 72 | 73 | == Navigating Lines == 74 | **# You can specify the number of lines to jump by entering a numeric value before moving** 75 | **# Etc. type **//40//** then press arrow-down, tell Vim to jump down 40 lines.** 76 | 77 | == Navigation == 78 | **# Navigate to the beginning of the document **//gg// 79 | **# Navigate to the end of the document **//G// 80 | **# Move to the end of a line **//$// 81 | **# Move to the beginning of a line **//0 // 82 | **# Move to the next word **//w// 83 | **# Move to the beginning of a word **//b// 84 | **# Move to the end of a word **//e// 85 | **# Move a sentence back **//(// 86 | **# Move a sentence forward **//)// 87 | 88 | == Folds == 89 | **# You can engulf code in **//{{{ }}} //**to make it fold-able** 90 | **# Navigate to a fold and hit **//Space//** to open/close toggle** 91 | **# Open all folds **//zR// 92 | **# Close all folds **//zM// 93 | **# Quickly create a set of fold markers **//zf Space// 94 | 95 | == Color Theme == 96 | **# Next Color Theme with **//F8// 97 | **# Random Color Theme with **//Alt+F8// 98 | 99 | 100 | ===== Visual Mode ===== 101 | **# Visual Mode is used for selecting text** 102 | **# Visual Mode for single characters **//v// 103 | **# Visual Mode for lines **//V// 104 | **# You can also hold down **//Shift//** and navigate left/right to start marking ** 105 | **# Once in Visual Mode, navigate around to select text** 106 | **# Below is a few options, that seems logic for selected text** 107 | 108 | **# Copy (yank) **y **# (modified to **//Ctrl+c //**)** 109 | **# Switch case **//~// 110 | **# Indent right **//>// 111 | **# Indent left **//<// 112 | 113 | 114 | ===== Vimdiff ===== 115 | **# Open and differentiate between two files** 116 | $ vimdiff /path/to/file1 /path/to/file2 117 | 118 | == Commands == 119 | **# Re-scan the files for differences **//:diffupdate// 120 | 121 | == Navigate the two files == 122 | **# Jump between the two files with **//Ctrl+w Ctrl+w //**(double)** 123 | 124 | == Search Differences == 125 | **# Next Difference with **//]c// 126 | **# Previous Difference **//[c// 127 | 128 | == Bring changes to their counterpart file == 129 | **# diff-obtain (do) brings changes from the other file, to the current file **//do// 130 | **# diff-put (dp) sends changes from the current file, to the other file **//dp// 131 | 132 | == Fold & Unfold == 133 | **# Unfold text with **//zo// 134 | **# Refold it with **//zc// 135 | **# Unfold both files completely **//zr// 136 | **# Fold both files completely **//zm// 137 | -------------------------------------------------------------------------------- /wireshark.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2017-02-08T23:55:17+01:00 4 | 5 | ====== wireshark ====== 6 | Created Wednesday 08 February 2017 7 | 8 | == Installation == 9 | $ pacman -S wireshark-gtk 10 | 11 | **# To allow a user to run Wireshark (without sudo) add the user to the **//wireshark//** group** 12 | **# Requires you to log out and back in to take effect ** 13 | $ gpasswd --add //<USER>// wireshark 14 | 15 | 16 | ===== Filters ===== 17 | **# A few typical filters for the output** 18 | 19 | == IP address == 20 | **# To set a filter for any packets to and/or from a specific IP address** 21 | ip.addr==//x.x.x.x// 22 | 23 | **# You can also specify two IP addresses to see a specific communication between two hosts** 24 | ip.addr==//x.x.x.x //&& ip.addr==//x.x.x.x// 25 | 26 | 27 | == Protocol == 28 | **# You can specify the protocol directly. Ex to track **//ftp//** packets** 29 | ftp 30 | 31 | **# Or **//HTTP// 32 | http 33 | 34 | **# Maybe **//DNS//**? etc** 35 | dns 36 | 37 | **# You can also exclude protocols** 38 | **# Here we exclude **//ARP, ICMP //**and**// DNS-all// 39 | !(arp or icmp or dns) 40 | 41 | 42 | == Port == 43 | **# We can track packets to/from a specific port, ex. port 80 (**//HTTP//**)** 44 | tcp.port==80 45 | 46 | 47 | == TCP resets == 48 | **# The reset flag is triggered when the hosts isn't supposed to recieve that package** 49 | tcp.flags.reset==1 50 | 51 | 52 | == Webpages being accessed == 53 | **# The GET and POST requests will display websites being accessed for the most parts** 54 | http.request 55 | 56 | 57 | == Searching == 58 | **# You can search for specific string in the packets. ** 59 | **#** **Ex, we want to search a username (**//stick//**)** 60 | tcp contains stick 61 | 62 | --------------------------------------------------------------------------------