Command Line Magic

@climagic

Cool Unix/Linux Command Line tricks you can use in $TWITTER_CHAR_LIMIT characters or less. Here mostly to inspire all to try more. Read docs first, run later.\~

BASHLAND
Vrijeme pridruživanja: studeni 2009.

Tweetovi

Blokirali ste korisnika/cu @climagic

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @climagic

  1. Prikvačeni tweet
    26. sij

    montage -font FreeSans-Bold -strokewidth 3 -stroke black -fill white -pointsize 80 -gravity south \( 1.jpg -annotate 0 LINKEDIN \) \( 2.jpg -annotate 0 FACEBOOK \) \( 3.jpg -annotate 0 INSTAGRAM \) \( 4.jpg -annotate 0 TINDER \) -tile 2x2 -mode Concatenate dc.jpg

    Prikaži ovu nit
    Poništi
  2. prije 2 sata

    printf "now- %d days\n" {1..332044} | date -f- +"%Y%m%d %m%d%Y %d%m%Y" | perl -ne 'chomp;=split(/ /);$all3=1;for($i=0;$i<3;$i++){ if ($d[$i] ne reverse($d[$i])){$all3=0} }; if($all3 == 1) {print "$_\n";}' # Verify first alignment of ZERO PADDED palindates across three formats.

    Prikaži ovu nit
    Poništi
  3. prije 6 sati

    This one had some assistance from the fine folks in the channel. I wanted to avoid having to fork a bunch of comparisons. Batch processing the dates, reversals and comparisons is much faster.

    Prikaži ovu nit
    Poništi
  4. prije 6 sati

    printf "now - %d days\n" {1..332044} |date -f- +%Y%_m%_d$'\n'%Y%m%d |tr -d ' ' > alldates.txt; rev alldates.txt >revdates.txt; paste alldates.txt revdates.txt |awk '$1==$2{print $1}' # Show that there have been several palindrome dates between now and 1111AD. Zero padded or not.

    Prikaži ovu nit
    Poništi
  5. 4. velj

    Happy 77th Birthday Ken Thompson, co-inventor or Unix. Check out this video of very inspiring interview between living legends Brian Kernighan and Ken Thompson at VCF East 2019

    Poništi
  6. 4. velj

    openssl s_client -connect -servername </dev/null 2>/dev/null |openssl x509 -noout --checkend 86400 # Check if the SSL certificate for a website is going to expire in less than a day.

    Poništi
  7. 4. velj

    python3 -m http.server 8080 # Start a simple webserver using python3 on external port 8080 and use the current directory you are in as the document root. Be careful with what you expose to the world. Use --bind 127.0.0.1 if you want to make it local only.

    Poništi
  8. 3. velj
    Poništi
  9. 3. velj

    unzip -d ~/3Dprinter -j Something\.zip 'files/*' -d ~/3Dprinter/ # This will unzip just the files within the files folder inside the zip file and put them in your ~/3Dprinter/ directory without making the files subfolder. Good for Thingiverse files. Make a function for it too.

    Poništi
  10. 31. sij

    Funny options (xmms2d): --yes-run-as-root Give me enough rope to shoot myself in the foot

    Poništi
  11. 31. sij

    # Did you know you can use the 'tee' command as a DVR? I did it 8 years ago when watching the Superbowl over a netcat connection. Yeah, netcat. This video explains how.

    Poništi
  12. 31. sij

    jp2a Photo.jpg | tee photo.ascii # Convert a photo into an ASCII art representation directly into the terminal and save it to photo.ascii at the same time.

    Poništi
  13. 31. sij

    xsel -b | sed 's/2019/2020/g' | xsel -b # Replace all instances of 2019 with 2020 in your X windows copy buffer. Mac users can use pbpaste and pbcopy instead.

    Poništi
  14. 30. sij

    If I got paid for the unsuccessful commands, I'd be richer than Bill Gates because $? would be > 0. You don't have to get them right all the time, just make sure to have good backups.

    Poništi
  15. 29. sij

    Which even if you're not doing this visualization you should be doing anyways or just turn off root logins altogether.

    Prikaži ovu nit
    Poništi
  16. 29. sij

    ssh root@192.168.0.1 tcpdump -n -i any -w- 'not \( port 22 and host 192.168.0.1 \)' |etherape -r- # Instant visualization of linux router traffic. Yes, root on the router, you can help make this more secure by forcing key auth only and setting PermitRootLogin forced-commands-only

    Prikaži ovu nit
    Poništi
  17. proslijedio/la je Tweet
    28. sij

    Hey , you gotta attribute the source of that horrible freeze frame of me with an ISO CD, cmon now.. 😎

    Poništi
  18. 28. sij

    climagic: How many monitors do you have? [4 options ought to be enough for anyone] All of you:

    Poništi
  19. 28. sij

    How many monitors are you using in your desktop setup?

    Poništi
  20. 28. sij

    grep -l -r 155.62.259.52 /etc # If you're just looking for the files where an IP might be referenced and not the countless lines that might come up, use grep's -l option to just get the list of files.

    Poništi
  21. 27. sij

    qalc "145Gbyte / 1.5Mibit/second to day" # How many days will it take to transfer 145GB (base 10 bytes) at 1.5Mibits/sec (base 2)? You can use qalc for that!

    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·