Skip to content

Instantly share code, notes, and snippets.

View Semisol's full-sized avatar
:shipit:
the

Semisol Semisol

:shipit:
the
View GitHub Profile
@htr3n
htr3n / macos-ramdisk.md
Last active May 7, 2024 02:13
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@Gregsen
Gregsen / dialog_progressbar.sh
Created December 6, 2013 11:40
A nice progressbar for downloads using wget and Dialog.
#!/bin/bash
# heavily inspired by http://fitnr.com/showing-file-download-progress-using-wget.html
URL=<YOUR DOWNLOAD URL>
wget --progress=dot "$URL" 2>&1 |\
grep "%" |\
sed -u -e "s,\.,,g" | awk '{print $2}' | sed -u -e "s,\%,,g" | dialog --gauge "Download Test" 10 100