Broadcast Engineer at BellMedia, Computer history buff, compulsive deprecated, disparate hardware hoarder, R/C, robots, arduino, RF, and everything in between.
4847 stories
·
5 followers

WSL: Change the current directory converting a Windows path to a Linux Path

1 Share
$ function _cd() { local dir="$(echo -n "${*//'\'/"/"}" | sed -e 's~\([a-z]\):~/mnt/\L\1~gi')"; if [ -d "$dir" ]; then cd "$dir"; fi; }
The Windows Subsystem for Linux (WSL) is a compatibility layer for running binary Linux executables natively in Windows. A folder such as "C:\Program Files (x86)\Common Files" is represented as "/mnt/c/Program Files (x86)/Common Files". This function allows you to change the current directory to a Windows folder.

commandlinefu.com

Diff your entire server config at ScriptRock.com

Read the whole story
tekvax
2 days ago
reply
Burlington, Ontario
Share this story
Delete

Slugify: converts strings in any language into Slugs (friendly names to use in URLs and filenames)

1 Share
$ function slugify() { echo "$@" | iconv -c -t ASCII//TRANSLIT//IGNORE | sed -r -e 's~[^[:alnum:]]+~ ~g' -e 's~^ *~~;s~ *$~~' -e 's~ +~-~g' | tr A-Z a-z; }
Slug the part of an URL which identifies a page using human-readable keywords. Slugs are used to construct friendly URLs (often for permalinks) that are easy to type, descriptive, and easy to remember.

commandlinefu.com

Diff your entire server config at ScriptRock.com

Read the whole story
tekvax
2 days ago
reply
Burlington, Ontario
Share this story
Delete

get a list of top 1000 sites from alexa

1 Share
$ curl -qsSl http://s3.amazonaws.com/alexa-static/top-1m.csv.zip 2>/dev/null | zcat | grep ".de$" | head -1000 | awk -F, '{print $2}'
a little bit smarter & i only want .de domains, so .....

commandlinefu.com

Diff your entire server config at ScriptRock.com

Read the whole story
tekvax
2 days ago
reply
Burlington, Ontario
Share this story
Delete

Convert epoch date to human readable date format in a log file.

1 Share
$ cat /var/log/mosquitto/mosquitto.log | awk -F : '{"date -d @"$1 |& getline D; print D, $0}'

commandlinefu.com

Diff your entire server config at ScriptRock.com

Read the whole story
tekvax
2 days ago
reply
Burlington, Ontario
Share this story
Delete

Chernobyl documentary footage vs. scenes from the show

1 Share

HBO's Chernobyl was widely praised for its realistic depiction of the disaster and of the late Soviet Union itself: so meticulous that its mistakes and simplifications stood out in uncanny relief to those who were there.

In this video, Thomas Flight compares footage from the show with the documentary footage it was based upon.

I'm curious about why the text on the scene below, derived from Soviet TV broadcast announcing the disaster, differs from the original. Did HBO use a different source, or did they change it themselves some reason? НОВОСТИ (Novosti) means "NEWS" and was then (and now) the name of the official news agency, while ВРЕМЯ (Vremya) means "TIME" and is apparently the name of the evening news show.

Read the whole story
tekvax
3 days ago
reply
Burlington, Ontario
Share this story
Delete

Vim devs fix system-pwning text editor bug

1 Share
Diehard text editor users everywhere breathed a sigh of relief this week as the open source community fixed a bug in one of the most venerable *nix programs: Vim.

Read the whole story
tekvax
3 days ago
reply
Burlington, Ontario
Share this story
Delete
Next Page of Stories