Post your Command line tricks

Forum rules
Share your brain ;)
User avatar
wuxmedia
Grasshopper
Posts: 5442
Joined: Wed Oct 17, 2012 11:32 am
Location: UK
Contact:

Re: Post your Command line tricks

Unread post by wuxmedia » Fri Jun 16, 2017 7:44 am

had to read those code boxes several times. Still not sure what they are about but I'm sure they are cool.
nice redshift alternative, yeah it doesn't need to be a big program, what the hell has the candian tv got to do with it? needs a wrapper to vary it at diff times of day.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
z3bra
Window Manager
Posts: 53
Joined: Fri Jun 27, 2014 8:34 am
Location: France
Contact:

Re: Post your Command line tricks

Unread post by z3bra » Sat Jun 17, 2017 10:57 pm

The first one is the vanilla way to create linux containers, so the last line is basically what happens when you use lxc-create or docker run.

The second one is more... subtle. The #include statement in C is read by the compiler at compilation time, and included in the code as if it were part of the file.
By including /dev/stdin, you get prompted to write the file to include at compile time, which means that you write the code DURING the compilation. I found that pretty cool!
BANGARANG, MOTHERFUCKER.

User avatar
wuxmedia
Grasshopper
Posts: 5442
Joined: Wed Oct 17, 2012 11:32 am
Location: UK
Contact:

Re: Post your Command line tricks

Unread post by wuxmedia » Sat Jun 17, 2017 11:11 pm

oh I see. This and some other things have got me doing the exercises in the C programming language book this weekend, so I do sort of get it more now :)
"Seek, and Ye shall find"
"Github | Chooons | Site"

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest