Tagged: Mac

0

Automate ports connectivity check using telnet and timeout

Check ports connectivity using automation with telnet and timeout commands. Timeout will help us not get blocked for a long time. Adjust the timeout value on case to case basis, # vi ~/check_my_server_hostname.sh timeout 2 bash -c “echo ‘exit’ |...

0

Create many files with random content

Source: https://unix.stackexchange.com/questions/199863/create-many-files-with-random-content   For example, Name size file1.01 2K file2.02 3K file3.03 5K etc.   Strategy – 1 #! /bin/bash for n in {1..1000}; do dd if=/dev/urandom of=file$( printf %03d “$n” ).bin bs=1 count=$(( RANDOM + 1024 )) done  ...

0

Download youtube playlist

Setup sudo apt-get install ffmpeg brew install youtube-dl Command youtube-dl –extract-audio –audio-format mp3 -o “%(title)s.%(ext)s” <url to playlist>   References https://askubuntu.com/questions/564567/how-to-download-playlist-from-youtube-dl Related posts: Compiling in $HOME Installing perl modules in non standard directory Bulk add remote host fingerprint in ~/.ssh/known_hosts...

0

Better WSL terminal

In your search of a Linux terminal on Windows you might have stumbled across projects such as cmder and WSL. There are many more projects like those. Personally for me this was the only configuration (in this post) that ended...

0

Chocolatey package manager for Windows

You will find a few similarities with Homebrew (https://brew.sh/) and linuxbrew (http://linuxbrew.sh/). Chocolatey (https://chocolatey.org/) is a similar package manager for windows.   Installation Installation command is a little weird than other OS. Inside an administrative command prompt, type below >”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”...

0

Telnet missing on MacOS

Source: https://forums.developer.apple.com/thread/79056 Manual installation Go to “www.gnu.org/software/inetutils/” (full URL omitted to avoid moderation) Click on the HTTP download link for “Inetutils” Download “inetutils-1.9.4.tar.gz” Compile and Install tar zxvf inetutils-1.9.4.tar.gz cd inetutils-1.9.4 ./configure make sudo make install telnet rainmaker.wunderground.com   Related posts:...

0

Handy bash commands

Top 20 files by size Concatenate multiple files skipping n rows Compress last X days data in one archive Compress files older than X days individually Merging multiple lines Find latest files recursively Get rows starting and ending between a...

0

Starting AMPPS without password on MAC

The below method will not start AMMPS without password, but instead does start mysql and apache web server if you have AMPPS installed already. There are 2 steps involved, 1. Modifying sudoers file, and 2. Creating a startup applescript application....

0

Wine on Mac – Enabling High Resolution mode (retina)

Source: https://www.winehq.org/announce/2.0 Enable Retina mode for Wine apps – The macOS graphics driver supports a high-resolution (“Retina”) rendering mode. It can be enabled by setting “RetinaMode” to “Y” under HKCU\Software\Wine\Mac Driver.     Related posts: Changing Wine key mappings on Mac...