Skip to content

Instantly share code, notes, and snippets.

View neilmacneil123's full-sized avatar
🎹

Neil MacNeil neilmacneil123

🎹
View GitHub Profile
@neilmacneil123
neilmacneil123 / web-servers.md
Created May 24, 2025 18:08 — 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
sudo apt install task-mate-desktop xorg dbus-x11 x11-xserver-utils lightdm
sudo apt install xrdp
sudo systemctl status xrdp
update-alternatives --set x-session-manager /usr/bin/mate-session
@neilmacneil123
neilmacneil123 / dockerfile-command
Created October 8, 2023 02:10 — forked from maxweisspoker/dockerfile-command
Bash alias to print "Dockerfile" for image by using sed with "docker history"
alias dockerfile='script.sh'
script.sh:
#!/bin/bash
echo "FROM scratch"
docker history --no-trunc $@ | tac | tr -s ' ' | cut -d " " -f 5- | sed 's,^/bin/sh -c #(nop) ,,g' | sed 's,^/bin/sh -c,RUN,g' | sed 's, && , \\\n & ,g' | sed 's,\s*[0-9]*[\.]*[0-9]*\s*[kMG]*B\s*$,,g' | head -n -1
@neilmacneil123
neilmacneil123 / New machine
Created February 15, 2023 19:55 — forked from ohadcn/New machine
install commonly used packages on new machine installation
few usefull scripts to configure and install a new development machine.
every file contains staff to be installed in a selected way, every line is for kind of develpers / development process.
@neilmacneil123
neilmacneil123 / MC Cheat Sheet
Created January 11, 2019 21:27 — forked from samiraguiar/MC Cheat Sheet
Midnight Commander Cheat Sheet
Shortcut Description
---------------------------------------------------------------
C-o Drop to the console
Insert Select/deselect file
* Invert selection on files
+ Specify file selection options (including custom pattern)
- The same as above, but for deselecting
F5/F6 Copy/move selected files