Skip to content

Instantly share code, notes, and snippets.

@smetana
smetana / web-servers.md
Created October 28, 2023 12:49 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Upgrade Mac Mini 1,1 to Mac Mini 2,1

Hardware Upgrade

Disclaimer: You are going to mess with your hardware and the lowest levels of your device. You should be somewhat savvy with the command line. I'm not responsible for any damage.

  • Make sure you have the latest version of Mac OS X Snow Leopard 10.6.8 intalled. Simply use the Software Updates tab in the System Preferences until no updates are available.
@smetana
smetana / add_repo_as_folder_keeping_history.md
Last active January 6, 2021 15:52
Add git repo as folder to another repo preserving history

Before

repo1
|--.git
|--.gitignore
|--repo1_files

repo2
|--.git
|--.gitignore
@smetana
smetana / raid1_slow_recovery.md
Last active August 29, 2015 14:26
Software Raid: How to speed up slow raid1 recovery

mdX and sdXX are used to save you from copy-paste troubles

To stop recovery mark drive as "fault"

mdadm /dev/mdX -f /dev/sdXX

Speed-up recovery

sudo echo 100000 > /proc/sys/dev/raid/speed_limit_min
sudo echo 400000 > /proc/sys/dev/raid/speed_limit_max