THEAARBS - 2018-12-31 23:57:41

Theatomheart’s Auto-Rice Bootstrapping Scripts (THEAARBS) THEAARBS will automatically setup my Arch Linux configuration and workflow. Credit Many thanks to Luke Smith and his YouTube channel for demonstrating why I should switch to I3. THEAARBS is directly lifted forked from Luke’s LARBS scripts. Getting THEAARBS is easy Open a terminal as root and run the following command: curl -sSL theatomheart.net/theaarbs.sh | bash Or, since piping to bash is risky, review the script before running it:

Arch Linux Install - 2018-12-30 14:13:25

Boot your computer to a USB drive with the latest Arch Linux iso, then follow these steps: Ping a public DNS or IP address to make sure you’re connected to the internet. ping 8.8.8.8 Turn NTP on timedatectl set-ntp true Prepare your disk Use lsblk to determine which disk to prepare. This example will use disk sda. fdisk to set partitions fdisk /dev/sda Create new partitions. # Delete existing partitions, if needed d -- delete partition [Enter] -- default partition number # Repeat until no partitions exist # Boot partition n -- new partition p -- primary [Enter] -- default partition number [Enter] -- default first sector +200M -- last sector # Swap partition (change +8G to match 100% or 150% of your RAM size) n -- new partition p -- primary [Enter] -- default partition number [Enter] -- default first sector +8G -- last sector # Root partition n -- new partition p -- primary [Enter] -- default partition number [Enter] -- default first sector +50G -- last sector # Home partition n -- new partition p -- primary [Enter] -- default partition number [Enter] -- default first sector [Enter] -- uses the rest of the drive space # Write the changes to finish fdisk w Create filesystems mkfs.

OpenSSH Config Examples - 2018-11-20 21:25:07

How do I create and setup an OpenSSH config file to create shortcuts for servers I frequently access under Linux or Unix desktop operating systems? A global or local configuration file for SSH client can create shortcuts for sshd server including advanced ssh client options. You can configure your OpenSSH ssh client using various files as follows to save time and typing frequently used ssh client command line options such as port, user, hostname, identity-file and much more.

Useful Cron Examples - 2018-11-15 20:29:22

Syntax Linux crontab has six fields. 1-5 fields defines the date and time of execution. The 6’th fields are used for command or script to be executed.The Linux crontab syntax are as following: [Minute] [hour] [Day_of_the_Month] [Month_of_the_Year] [Day_of_the_Week] [command] Astrics (*) – Matches anything Define range – You can define range using the hypen like: 1-10 or 20-30 or sun-fri or feb-apr Define multiple range – You can define multiple ranges with command seprated like: jan-mar,jul-sep How to Add/Edit Crontab To add or update job in crontab, use below command.

Useful DD Commands - 2018-11-15 20:29:22

Duplicate several drives concurrently dd if=/dev/sda | tee >(dd of=/dev/sdb) | dd of=/dev/sdc If you have some drive imaging to do, you can boot into any liveCD and use a commodity machine. The drives will be written in parallel. To improve efficiency, specify a larger block size in dd: dd if=/dev/sda bs=64k | tee >(dd of=/dev/sdb bs=64k) | dd of=/dev/sdc bs=64k To image more drives, insert them as additional arguments to tee:

How to Test SMTP via Telnet - 2018-09-15 20:29:22

Telnet to your mailserver telnet mail.domain.com 25 EHLO domain.com MAIL FROM:<[email protected]> RCPT TO:<[email protected]> DATA Subject: This is a subject line Press Enter twice; a blank line is needed between the Subject field and the message body. Type the rest of your message, then press Enter. To finish the message, type a period ( . ) and press Enter QUIT

Pi-Hole Setup - 2018-09-15 20:29:22

Install curl -sSL https://install.pi-hole.net | bash Fix static IP assignment Edit the file /etc/network/interfaces Make sure you have lines that look something like: # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 Fixing HTTPS Issues That Cause Slow-Loading Pages Pi-hole is only handling the DNS queries and doesn’t know about the other protocols that are taking place. But we can use iptables to manage these protocols to prevent time-outs allowing Pi-hole to work it’s magic.

Raspberry Pi Stuff - 2018-06-10 20:19:03

As the Raspberry Pi doesn’t have a conventional BIOS, the various system configuration parameters that would normally be kept and set using the BIOS are now stored in a text file named “config.txt”. The Raspberry Pi config.txt file is read by the GPU before the ARM core is initialized. This file is an optional file on the boot partition. It would normally be accessible as /boot/config.txt from Linux, but from Windows (or OS X) it would be seen as a file in the accessible part of the card.

Windows Stuff - 2018-05-26 00:47:53

How to Crack a Windows Login net user [username] [password] Here is a working method Boot the computer into a mode that gives you access to the command prompt. if you use a windows installer, select the repair computer option. At the command prompt, change directory to C:\windows\system32 copy cmd.exe to replace utilman.exe using the following commands move utilman.exe utilman.bak copy cmd.exe utilman.exe Reboot Boot in normal mode, at the login screen use crtl+alt+del to open the windows login dialog, then use windowskey+u and the command prompt should open.

感人的故事:ESXi Stuff - 2018-05-12 18:35:54

Common Commands Provide console screen to ssh session dcui Top esxtop VMware interactive shell vsish Logs tail to look at the end of a file tail /var/log/hostd.log tail -f /var/log/hostd.log (-f to follow updates on screen) cat to read logs cat /var/log/hostd.log grep to search for terms tail /var/log/hostd.log | grep -i Power List vmkernel errors vmkerrcode -l Host Management List information about the host

Current Winning Conky - 2018-01-20 21:25:07

My current favorite Conky config that I use nowhere. background no xinerama_head 1 use_xft yes xftfont Monospace:size=10 xftalpha 0.1 update_interval 2 total_run_times 0 own_window yes own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes text_buffer_size 256 draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color gray default_shade_color red default_outline_color green alignment top_right gap_x 10 gap_y 10 no_buffers no uppercase no cpu_avg_samples 2 net_avg_samples 1 override_utf8_locale yes use_spacer none own_window_argb_value 0 own_window_argb_visual yes own_window_colour 000000 minimum_size 0 0 # Gris color2 6D6D6D # Blanco color3 FFFFFF # Verde color4 20B2AA # Morado color5 99297B # Rosa pálido color6 D2CBDD TEXT ${color4}╔════════════════════╗ ║${offset 15}${font Monospace:normal:size=10}${color6}SYSTEM: ${color5}$nodename ${offset 9}${color4}├──────────────────────┐ ${color4}├════════════════════╝ ${alignr}│ └─?┄${offset 15}${font Monospace:normal:size=10}${color6}${offset 24}Up Time: ${color5}$uptime ${color4}${alignr}│ ${offset 16}└┄${offset 15}${font Monospace:normal:size=10}${color6}Local Time: ${color5}$time ${color4}${alignr}│ ${color2}${alignr}${voffset 4}${battery_short}${color4} ${battery_bar 14,140}${voffset -4}${color4}┨ ${offset 88}┌───────────────┶┷┷┷┷┷┷┷┷┷┷┷┷┷┷┵─╝ ${offset 8} ╔══┴══╗ ${offset 32} ║${offset 9}${font Monospace:normal:size=10}${color6}NET${color4}${offset 7}├──┬┄┄ ${color6}PUBLIC:${color5}${execi 3600 wget -q -O /dev/stdout //checkip.

How To Set Up SSH Keys - 2018-01-11 00:27:03

By Etel Sverdlov About SSH Keys Secure Shell (better known as SSH) is a cryptographic network protocol which allows users to securely perform a number of network services over an unsecured network. SSH keys provide a more secure way of logging into a server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone.

How To Use SFTP to Securely Transfer Files with a Remote Server - 2018-01-11 00:27:03

By Justin Ellingwood How to Connect with SFTP By default, SFTP uses the SSH protocol to authenticate and establish a secure connection. Because of this, the same authentication methods are available that are present in SSH. Although passwords are easy to use and set up by default, we recommend you create SSH keys and transfer your public key to any system that you need to access. This is much more secure and can save you time in the long run.

How to Rescue a Non-booting GRUB 2 on Linux - 2018-01-11 00:27:03

By Carla Schroder Once upon a time we had legacy GRUB, the Grand Unified Linux Bootloader version 0.97. Legacy GRUB had many virtues, but it became old and its developers did yearn for more functionality, and thus did GRUB 2 come into the world. GRUB 2 is a major rewrite with several significant differences. It boots removable media, and can be configured with an option to enter your system BIOS.

ASA VPN Help - 2017-12-11 15:30:24

hostname VPN !--- Enable authentication, authorization and accounting (AAA) !--- for user authentication and group authorization. aaa new-model !--- In order to enable Xauth for user authentication, !--- enable the aaa authentication commands. aaa authentication login userauthen local !--- In order to enable group authorization, enable !--- the aaa authorization commands. aaa authorization network groupauthor local aaa session-id common resource policy !--- For local authentication of the IPsec user, !--- create the user with a password.

10 Basics of Linux that apply to managing VMware ESX through the service console - 2017-11-23 01:54:33

by David Davis posted on September 1, 2009 Introduction If you are using the full version of VMware ESX you have the option to manage it, from the command line, using the service console operating system (called the COS). The service console, in VMware ESX, is really a modified version of Red Hat Enterprise Linux. Thus, basic Linux administration knowledge is very valuable when you go to manage VMware ESX from the command line.

PPTP VPN - 2017-09-15 20:29:22

Install pptp-linux package sudo apt-get install pptp-linux Create a PPTP connection profile sudo pptpsetup --create <nameofvpn> --server <vpn.server.com> --username vpnuser When you hit ENTER you should be asked for the VPN password. The profile will be saved in /etc/ppp/peers/ To enable the VPN connection sudo pon <profilename> You can see your PPTP connection using ifconfig -s. It should be listed under ppp0. To kill the VPN connection

Mount SMB Network Drives in Linux - 2017-08-26 20:11:38

In order to mount the drive, you need to have cifs-utils installed on your system. sudo pacman -S cifs-utils sudo apt-get install cifs-utils Mounting network folders You might have public folders on your network drive that can be accessed by anyone without having to provide any credentials. These are mounted in the same way as password-protected folders (we will mount these in the next section), but with a few different options.

VNC Setup is Easy - 2017-08-26 20:03:33

Install x11vnc sudo pacman -S --noconfirm x11vnc Store VNC password to a file x11vnc -storepasswd By default this will store your password at ~/.vnc/passwd Add this command to your startup script x11vnc -forever -rfbauth /home/[username]/.vnc/passwd For Raspberry Pi If the Raspberry Pi is headless, you may want to add the following lines to /boot/config.txt hdmi_force_hotplug=1 hdmi_group=1 hdmi_mode=16

Hide Your Processes From Other Users in Linux - 2017-08-26 14:52:20

All modern multi-tasking operating systems, including Linux, run a series of processes for each of the tasks being executed. A notepad application is a process, a terminal window is a process, the SSH server is a process, each SSH connection is a process and so on. Linux schedules the various system resources (CPU time, memory, I/O) so that each process get an opportunity to run. To see the list of current processes running, you can use the ps command.

How To Encrypt Directories/Partitions With eCryptfs - 2017-08-26 14:37:49

This example provides steps for encrypting an existing home directory Install eCryptfs apt-get install ecryptfs-utils Backup existing Home directory cp -pfr /home/[username]/ /tmp/ Mount /home/[username] with the file system type ecryptfs mount -t ecryptfs /home/[username] /home/[username] Select cipher: aes Select key bytes: 16 Enable plaintext passthrough (y/n) [n]: <-- ENTER Enable filename encryption (y/n) [n]: <-- ENTER Would you like to proceed with the mount (yes/no)? : <-- yes Would you like to append sig.

SQL Stuff - 2017-08-26 00:44:52

Shrink log files Log into Microsoft SQL Server Management Studio Right click on your database Select Properties Click on Options Change the recovery model to Simple Click OK Right click on the database Select Tasks > Shrink > Database Click OK Right click on the database Select Properties Click on Options Change the recovery model to Full Click OK Reset sa password From command prompt osql -L Copy full name of SQL Server and type:

Forceful Removal of a Domain Controller - 2017-08-26 00:31:47

Know Your FSMO Locations Make sure that the DC you are removing is not holding any of the FSMO Roles On any health domain controller, click Start, click Run, type Ntdsutil in the Open box, and then click OK Type roles, and then press ENTER Type connections, and then press ENTER Type connect to server , where is the name of the server you want to use, and then press ENTER Type quit, and then press ENTER Type select operation target, and then press ENTER Type list roles for connected server, and then press ENTER Review the listed roles and their host, if the DC that wish to remove is not listed proceed to step 4 Seizing FSMO Roles (The Last Resort) If for what ever reason you can not do a clean transfer you will need to seize it

Sharepoint Stuff - 2017-08-26 00:25:32

Create Document Templates for Sharepoint Document Libraries With SharePoint, there’s a feature that helps with source control for document templates. Using Content Types in combination with document libraries we can have a set of document templates that users can choose from, edit and save without over-writing the original document. Here are the steps to implement this: Create a Document Library Within the site that contains that Document Library, go to Site Actions > Site Settings Under the Galleries section, click on Site Content Types Click the Create link at the top of the list.

Rubber Ducky Payloads - 2017-08-25 20:27:19

Boring Utility Hello World (Windows) For testing functionality. DELAY 3000 GUI r DELAY 500 STRING notepad DELAY 500 ENTER DELAY 750 STRING Hello World!!! ENTER Hide cmd window (Windows) The following is an example of how to hide the command window below the bottom of the screen while typing in commands. The window movement part of the script can also be used on any other window. CMD.exe is also run with some command line flags for changing the appearance of the window to make it harder to view, and also a flag that turns on delayed expansion in the command prompt which allows for variable names to be called more than once in a line with no adverse effects.

Kodi Smart Playlist Example - 2017-08-25 19:07:48

Filename.xsp should look something like this <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <smartplaylist type="songs"> <name>My Smart Playlist</name> <match>one</match> <rule field="albumartist" operator="contains"><value>Bob Marley</value></rule> <rule field="albumartist" operator="contains"><value>James Brown</value></rule> <rule field="albumartist" operator="contains"><value>Squirrel Nut Zippers</value></rule> </smartplaylist>

Exchange Stuff - 2017-08-25 18:24:55

Get a list of addresses, export to c:\smtp.csv Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress,@{Name="EmailAddresses";Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq "smtp"} | ForEach-Object {$_.SmtpAddress}}} | Export-CSV c:\smtp.csv -NoTypeInformation Whitelist a domain or address To check whats currently whitelisted Get-ContentFilterConfig To whitelist an address $list = (Get-ContentFilterConfig).BypassedSenders $list.add("[email protected]") Set-ContentFilterConfig -BypassedSenders $list To whitelist a domain $list = (Get-ContentFilterConfig).BypassedSenderDomains $list.add("domain.com") Set-ContentFilterConfig -BypassedSenderDomains $list Permissions to Import or Export Mailbox Data in Exchange 2010 In Exchange 2010 none of the preloaded role groups have the Mailbox Import Export role, The person performing the import or export must have the appropriate permissions within Exchange.

Office Stuff - 2017-08-25 14:36:37

Outlook Autocomplete/NK2 Locations Outlook 2003, 2007 with Windows 2000, XP, or Server 2003 C:\Documents and Settings\[User Profile]\Application Data\Microsoft\Outlook\filename.NK2 Outlook 2003, 2007 with Windows Vista, 7, or Server 2008 C:\Users\[User Profile]\AppData\Roaming\Microsoft\Outlook\filename.NK2 Outlook 2010, 2013 with Windows Vista, 7, or Server 2008 C:\Users\[User Profile]\AppData\Local\Microsoft\Outlook\RoamCache\Stream_Autocomplete_[key].dat Outlook 2010, 2013 with Windows XP C:\Documents and Settings\[User Profile]\Local Settings\Application Data\Microsoft\Outlook\RoamCacheStream_Autocomplete_[key].dat When you use the NK2Edit utility, you don’t have to worry about locating the NK2 file, it automatically opens the default file for you.

AutoHotKey Stuff - 2017-08-25 04:02:38

(From Old Darkfall Online Scripts) A simple macro loop #IfWinActive Darkfall Online $+Lbutton:: Loop { Send a ;row2 sleep 500 send {Lbutton} sleep 4000 send w ;row3 sleep 500 send {lbutton} sleep 4000 send t ;row4 sleep 500 send {lbutton} sleep 4000 send g ;row5 sleep 500 send {lbutton} sleep 4000 } ATS test #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

CPU Busy Batch - 2017-08-25 03:57:02

Dim goal Dim before Dim x Dim y Dim i goal = 2181818 Do While True before = Timer For i = 0 to goal x = 0.000001 y = sin(x) y = y + 0.00001 Next y = y + 0.01 WScript.Echo "I did three million sines in " & Int(Timer - before + 0.5) & " seconds!" Loop

How to Easily Recognize Web Colors from RGB Codes - 2017-08-25 03:52:02

If you’ve ever customized the design of your HTML website, or tried changing the background color of your social profiles, you’ve probably encountered Hexadecimal color codes. These are a string of 6 characters - like “0066FF” - that you know represent colors but we rarely make the effort to understand them. Here is a simple guide to help you recognize web colors more quickly from their RGB codes. No more guessing or consulting the color palettes.

感人的故事:Veeam Error: Failed to Quiesce the VM - 2017-08-25 03:47:15

Some of the VMware KB suggestions include: KB#2069952 KB#2034002 However, the virtual disk service suggestion didn’t help, and the other suggestion requires a reboot, which was not possible in my situation. The solution I found was to modify the VMware tools installation to REMOVE the VMware tools VSS option.

Xen Stuff - 2017-08-25 03:38:56

Troubleshoot a Hung VM The issue is that the iSCSI storage was lost due to loss of connectivity to the SAN from XenServer. Gather Information from VM’s: xe vm-list This returns all of the VMs in the XenServer cluster. Specifically this will give you the UUID and Name of the VM. If this was just a power down issue, we could easily reset the power state with the following command:

ASA IPSec with Shrewsoft - 2017-08-25 02:56:24

This guide provides information that can be used to configure a Cisco PIX/ASA device running firmware version 7.x to support IPsec VPN client connectivity. If you have a PIX device running firmware version 6.x, please consult the HowtoCiscoPix. The Shrew Soft VPN Client has been tested with Cisco products to ensure interoperability. Overview The configuration example described below will allow an IPsec VPN client to communicate with a single remote private network.

ASDM Setup - 2017-08-25 02:53:19

Linux Add a security exception; open up the Java Control Panel with the following command: /usr/java/latest/bin/ControlPanel Click Security tab, Edit Site List, add address of the ASA example: https://192.168.10.1:444/ Close the Exception Site List and the Java Control Panel In terminal, type: javaws https://<SITE_ADDRESS>/admin/public/asdm.jnlp Windows Install 32-bit version of Java 6u29 ASDM Launcher shortcut: "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -Xms64m -Xmx512m To enable ASDM/SSH access Configuration Device Management Management Access ASDM/HTTPS/Telnet/SSH Add interface permissions

MDaemon Stuff - 2017-08-24 04:47:32

Create a CSR and Import a Third-Party SSL Certificate for MDaemon MDaemon does not have a method of creating a Certificate Signing Request (CSR) for you in order to obtain a third party SSL certificate issued by a Trusted Root Authority (such as Verisign or GoDaddy). In the past, we have recommended installing Internet Information Server (IIS) and using it to generate the certificate request, but that may be difficult for Administrators who are not used to working with that product or who do not wish to install IIS on their server.

Active Directory User Login Script - 2017-08-22 20:20:23

On Error Resume Next Dim WSHShell, WSHNetwork, DomainString, UserObj, GroupObj Set WSHShell = CreateObject("WScript.Shell") Set WSHNetwork = CreateObject("WScript.Network") 'Automatically grab the user's domain name DomainString = WSHNetwork.UserDomain 'Find the windows Directory WinDir = WSHShell.ExpandEnvironmentStrings("%winDir%") 'Grab the user name UserString = WSHNetwork.UserName 'Bind to the user object to get user name and check for group memberships later Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString) 'Grab the computer name for use in add-on code later strComputer = WSHNetwork.

Linux Command Line Guide - 2017-08-22 20:20:23

Compression Compress or decompress a bzip file bzip filename Create filename.tar with [files] tar cf filename.tar [files] Extract files from filename.tar tar xf filename.tar Create a new tar file with gzip compression tar czf filename.tar.gz [files] Extract a tar using gzip tar xzf filename.tar.gz Create a new tar file with bzip2 compression tar cjf filename.tar.bz2 [files] Extract a tar using bzip2 compression tar xjf filename.

How To Lock Down Remote Desktop Services - 2017-07-24 10:11:42

Preparation Create OU for RDS Server in Active Directory. Create security group for users who will use Remote Desktop Host (i.e. RDS Users). Create GPO (i.e. RDS Server Lock Down). In Security Filtering delete Authenticated Users, add RDS Server Computer Account, and the security group created in previous step. Configure users who can connect to the server remotely: Log in to RDS Server >>> Run >>> control system >>> Remote Settings >>> Remote tab >>> Select users >>> Delete any groups/users >>> Add security group for RDS users

Disk Cloning in Linux - 2017-03-03 11:17:41

The dd command utility is a simple yet powerful and useful command available in Unix and Linux systems which is used to convert and copy files. Unix like systems treat all devices as files and these device files are located in the /dev directory in your system. So typically your hard disk drive is a file in the /dev directory with the prefix of hd or sd (depending on IDE or SCSI driver).

Windows 10 Product Key Activation Methods - 2017-02-27 21:01:12

Change Windows 10’s product key using Settings Open Settings Click on Update & security Click on Activation Click the Change product key link Type the 25-digit product key for the version of Windows 10 you want Click Next to complete the process If the activation process completes successfully, you’ll get the “Windows is activated” message. Change Windows 10’s product key using Control Panel Use the Windows key + X keyboard shortcut to open the Power User menu and select System Click the Change product key link under the Windows activation section Type the 25-digit product key for the version of Windows 10 you want Click Next to complete the process Similar to the Settings app, if the activation process completes successfully, you’ll get the “Windows is activated” message.

THEAARBS sysadmin - nets - 2018-12-29 13:18:36

Raw #!/bin/bash # Bound to Mod+n # Set menu properties mymenu=$(setmenu -l) # Where network documents are stored Docs="/home/$USER/Documents/networks/" # Where should log files be stored Logs="/home/$USER/Logs/" MenuChoices=\ "Info Servers Networking Workstations Printers Ping PullRC Reboot ShoVer Time Entry VPN" runprefix= tty=$(tty) case $tty in *tty1|"not a tty") runprefix="$TERMINAL -e" ;; esac ClearExit() { clear ; exit 0 ;} SecurePW() { PassFile=$(mktemp) ; echo "$Password" >$PassFile ;} Say() { (echo "$1" "$2" | lolcat) ; notify-send "$1" "$2" ;} MainMenu() { Chosen=$(cat /tmp/nets-names | $mymenu "Choose a network:") || ClearExit clear [[ $Chosen = "Time Entry" ]] && timeentry && ClearExit for i in $Docs* ; do [[ $Chosen = $( (sed "3q;d" $i) | awk '{print $2;}' | cut -d '"' -f2) ]] && Document=$i done [[ -z $Document ]] && ClearExit ScanDoc $Document CommandMenu ;} CommandMenu() { CommandChoice=$(echo -e "$MenuChoices" | $mymenu "$Network Command:") clear [[ -z $CommandChoice ]] && ClearExit case $CommandChoice in "Info") openfile $Document ; exit 0 ;; "Time Entry") timeentry $Network ; exit 0 ;; "VPN") connectvpn "$VPNType" "$VPNName" "$Network" ; exit 0 ;; *) SubMenu ;; esac ;} SubMenu() { case $CommandChoice in Ping) ChosenHost=$(echo -e "$ServerChoices\n$SwitchChoices\n$WorkstationChoices\n$PrinterChoices" | \ $mymenu "$Network Choose a device to ping:") ;; Reboot) ChosenHost=$(echo -e "$ServerChoices" | $mymenu "$Network Choose a device to reboot:") ;; PullRC) ChosenHost=$(echo -e "$CiscoChoices\nALL!

THEAARBS tools - linkhandler - 2018-12-28 09:17:26

Raw #!/bin/bash # Imgur client id # Required for indirect imgur links imgurClientId="" # Temp file directory tmpDir="/tmp/linkhandler" # Handlers imgHandler="feh" gifHandler="mpv --quiet --loop" vidHandler="mpv --quiet" dwnHandler="tsp wget" bcpHandler="bandcamp-dl" redHandler="rtv" browser=$BROWSER ## Templates imgFiles="png apng jpg jpeg jpe bmp tiff" # Images imgSites="i.imgur.com/ \|i.redd.it/ \|deviantart.com/ \|tinypic.com/ \|unsplash.com/photos/ \|gyazo.com/ \|prnt.sc/ " gifFiles="gif webm" # Gifs gifSites="gfycat.com/ \|giphy.com/ \|gph.is/ \|gifbin.com/ \|clips.twitch.tv/ \|streamable.com/ " vidFiles="mkv mp4 mov mpv flv avi" # Video vidSites="youtube.

THEAARBS menus - netmenu - 2018-10-05 22:47:05

Raw #!/bin/bash # Network tools menu # Bound to Mod+F6 mymenu=$(setmenu -l) IOFile=$(mktemp) amitty=$(tty) case $amitty in *tty1|"not a tty") runprefix="$TERMINAL -o $IOFile -e" ;; esac MenuChoices=\ "cisco connect to dig ftp killvpn nmtui nmgui clonesite ping pingsubnet smtp ssh keys ssl query speedof lan speedof wifi speedof wan newnet cifs mount whois winbox wireshark" MenuCommands() { case $choice in "cisco") CiscoMenu ;; "ftp") UtilFTP ;; "killvpn") killvpn ;; "nmtui") $runprefix nmtui ;; "nmgui") nm-connection-editor ;; "clonesite") UtilCloneSite ;; "connect to") connectcomputer ;; "ping") $runprefix cping $(inprompt "Hostname or IP:") ;; "pingsubnet") $(ifinstalled nmap) && $runprefix pingsubnet $(inprompt "Subnet to ping:") ;; "smtp") SMTPMenu ;; "ssh keys") SSHMenu ;; "ssl query") UtilSSLQuery ;; "speedof lan") $runprefix speedof -l ;; "speedof wifi") $runprefix speedof -w ;; "speedof wan") speedof -i ;; "newnet") sudo systemctl restart NetworkManager ;; "cifs mount") UtilCIFSMount ;; "dig") DigMenu ;; "whois") UtilWhois ;; "winbox") $(ifinstalled winbox) && winbox ;; "wireshark") $(ifinstalled wireshark-gtk) && sudo wireshark-gtk ;; esac ;} Say() { (echo "$1" "$2" | lolcat) ; notify-send "$1" "$2" ;} GetKeyFile() { KeyFile="$(find /home/$USER/.

THEAARBS tools - speedof - 2018-08-04 13:03:49

Raw #!/bin/bash Say() { echo -e "$1\n$2" ; notify-send "$1" "$2" ;} get_interfaces() { for i in $all_interfaces ; do interface_name="${BLOCK_INSTANCE:-$i}" case $interface_name in eno*|eth*) LanInterface=$interface_name ;; wlp*|wlan*) WLanInterface=$interface_name ;; esac done ;} speed_meter() { $(ifinstalled speedometer) && all_interfaces=$(ls /sys/class/net) get_interfaces $all_interfaces case $1 in lan) the_interface=$LanInterface ;; wlan) the_interface=$WLanInterface ;; esac [[ -z $(ip addr show $the_interface | perl -n -e '/inet ([^\/]+)/ && print $1') ]] && Say "? Error: interface $the_interface is not connected" || speedometer -t $the_interface ;} get_speedlimits() { $(ifinstalled speedtest) && Say "? Testing internet speeds.

THEAARBS tools - syncworkflow - 2018-07-07 03:11:46

Raw #!/bin/bash # Bound to Mod+UpArrow and Mod+DownArrow MenuChoices=\ "all browsers calendar documents dotfiles hosts hugo pictures projects scripts ssh vpn" choices=${MenuChoices//'\n'/ } choices=($choices) # Set dmenu properties mymenu=$(setmenu -l) # # --- User-defined variables # ServerHost should also be defined in ~/.ssh/config # for key-authenticated sshfs connections to the # backup repository ServerHost="nas" # SyncPath should be the path to a writeable directory # inside your backup repository SyncPath="/media/home-nas/6eece2a2-d4d4-47d6-bb12-ae9db150e8e6/rsync_computers" # NASMountRoot is the 'root' directory of your # backup repository; this will be mounted to a local # directory NASMountRoot=".

THEAARBS menus - search - 2018-05-06 03:11:46

Raw #!/bin/bash # A menu script for easy web searching. # Bound to Mod+s SearchSites=\ "DuckDuckGo ArchWiki BandCamp IMDB Reddit Rev Wikipedia YouTube" SearchCommands() { case "$Choice" in r|Reddit) $runprefix rtv -s "$Query" ;; yt|YouTube) $runprefix youtube-viewer $Query ;; rev|Rev) $BROWSER "https://revolutiontt.me/browse.php?search=$Query" ;; ddg|DuckDuckGo) $BROWSER "https://duckduckgo.com/?q=$Query&t=ffab&atb=v1-1" ;; aw|ArchWiki) $BROWSER "https://wiki.archlinux.org/index.php?search=$Query" ;; w|Wikipedia) $BROWSER "https://en.wikipedia.org/?search=$Query" ;; bc|BandCamp) $BROWSER "https://bandcamp.com/search?q=$Query" ;; im|IMDB) $BROWSER "//www.imdb.com/find?ref_=nv_sr_fn&q=$Query&s=all" ;; esac ;} runprefix= mymenu=$(setmenu -l) Query=${@:2} Choice=$1 amitty=$(tty) case $amitty in *tty1|"not a tty") runprefix="$TERMINAL -e" ;; esac if [ -z "$Choice" ]; then Choice=$(echo -e "$SearchSites" | $mymenu "?? Search where") ; fi if [ -z "$Query" ]; then Query=$(inprompt "?? Search terms") ; fi if [ -z "$Query" ]; then clear ; exit 1 ; fi if [ -z "$Choice" ]; then Choice="ddg" ; fi SearchCommands clear

THEAARBS tools - backup - 2018-05-06 03:11:46

Raw #!/bin/bash # Bound to Mod+Backspace # Set menu properties mymenu=$(setmenu) # # --- User-defined variables # ServerHost should also be defined in ~/.ssh/config # for key-authenticated sshfs connections to the # backup repository ServerHost="nas" # NASPath should be the path to a writeable directory # inside your backup repository NASPath="/media/home-nas/9c360a84-078b-4cc5-9515-a38f3f84daa5/backup" # NASMountRoot is the 'root' directory of your # backup repository; this will be mounted to a local # directory NASMountRoot=".

THEAARBS menus - config - 2018-05-05 22:59:24

Raw #!/bin/bash # A menu script for conveniently accessing config files # Bound to Mod+F2 # Each menu choice has a file to edit # or command to run in the MenuCommands() function MenuChoices=\ "alias appearance audio backup bash bookmarks contacts disks hosts i3 i3blocks input mpd mpv mutt newsboat printers profile ranger rss screens scripts ssh startup surf tmux vim x zathura" MenuCommands(){ case $chosen in alias) openfile ~/.

THEAARBS menus - recordmenu - 2018-05-05 22:47:05

Raw #!/bin/bash # Recording options menu # Bound to Mod+Insert # Usage: # `record`: Ask for recording type via dmenu # `record screencast`: Record both audio and screen # `record video`: Record only screen # `record audio`: Record only audio # `record kill`: Kill existing recording # # If there is already a running instance, user will be prompted to end it. mymenu=$(setmenu -l) updateicon() { \ echo "$1" > /tmp/recordingicon pkill -RTMIN+9 i3blocks } killrecording() { recpid="$(cat /tmp/recordingpid)" # kill with SIGTERM, allowing finishing touches.

THEAARBS tools - publish - 2018-05-05 03:11:46

Raw #!/bin/bash # Bound to Mod+Shift+Backspace # Publish a Hugo site to a remote server # User-defined variables are set in # ~/.config/hugosites.conf file Say() { echo "$1" "$2" ; notify-send "$1" "$2" ; echo "$1" "$2" >> $LogFile ;} ConfigFile="/home/$USER/.config/hugosites.conf" ConfigFiletmp='/tmp/hugosites.conf' if egrep -q -v '^#|^[^ ]*=[^;]*' "$ConfigFile" then Say "??? Config file is unclean, cleaning it..." egrep '^#|^[^ ]*=[^;&]*' "$ConfigFile" > "$ConfigFiletmp" cp "$ConfigFiletmp" "$ConfigFile" fi source "$ConfigFile" runprefix= # Set menu properties mymenu=$(setmenu -l) amitty=$(tty) case $amitty in *tty1|"not a tty") runprefix="$TERMINAL -e" ;; esac mkdir -p $PathToLogs/push LogFile="$PathToLogs/push/$(date +%b%d)/$(date +%H%M).

THEAARBS menus - dmenuhandler - 2018-04-29 09:17:26

Raw #!/bin/bash # Feed this script a URL and choose what opens it # Bound to Mod+y MenuChoices=\ "$READER $IMGVIEWER $BROWSER w3m mpv mpv (loop) mpv (float) wget stream-dl bandcamp-dl" runprefix= mymenu=$(setmenu -l) amitty=$(tty) case $amitty in *tty1|"not a tty") runprefix="$TERMINAL -e" ;; esac if [ -z $1 ] ; then url=$(inprompt "URL:") || exit else url=$1 ; fi handle_url() { if [[ "${#1}" -gt 30 ]] then visual="${1:0:20}"..."${1: -7}" else visual="$1" fi echo $visual choice=$(echo -e "$MenuChoices" | $mymenu "Handler for $visual:") clear case "$choice" in "$READER") $runprefix $READER "$1" &disown ;; "IMGVIEWER") $IMGVIEWER "$1" &disown ;; "$BROWSER") $BROWSER "$1" & disown ;; w3m) $runprefix w3m "$1" ;; mpv) mpv -quiet "$1" & disown ;; "mpv (loop)") mpv -quiet --loop "$1" & disown ;; "mpv (float)") mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" /dev/video0 "$1" & disown ;; wget) wget "$1" & disown ;; stream-dl) youtube-dl "$1" & disown ;; bandcamp-dl) cd ~/Downloads bandcamp-dl "$1" >/dev/null && notify-send "?? Finished downloading" "$(basename $1)" || notify-send "? Error downloading" "$(basename $1)" ;; esac ;} handle_url $url

THEAARBS tools - extract - 2016-05-04 13:03:49

Raw #!/bin/bash Dir=$(pwd) Say() { echo "$1" "$2" | lolcat ; notify-send "$1" "$2" ;} MultipleFiles() { for f in $Dir/* do ExtractFile $(basename $f) done ;} ExtractFile() { Name=${1%.*} mkdir $Name && cd $Name case $1 in *.tar.bz2|*.tbz2) Com="tar xvjf ../$1" ;; *.tar.gz|*.tgz) Com="tar xvzf ../$1" ;; *.tar.xz) Com="tar xvJf ../$1" ;; *.tar) Com="tar xvf ../$1" ;; *.lzma) Com="unlzma ../$1" ;; *.bz2) Com="bunzip2 ../$1" ;; *.rar) Com="unrar x -ad .
160| 466| 588| 404| 110| 638| 646| 863| 104| 388|