In this “cut to the chase” tutorial I’ll show you how to clone Github repo using ssh on Mac OS or Linux (so that you won’t need to use password).
Continue reading How to clone Github repo using SSHCategory: Linux
When copying a large file on Linux transfer hangs at the end… And you want to f**king kill someone.
There’s an annoying bug in almost every Linux distribution I’ve worked with. When your copying a large file to usb device (pendrive etc.) it hangs at the end (I mean it haaaaaaaaaaaaangs).
I’ve found a solution that works on Elementary and Ubuntu (at least).
Simply paste this two commands in your terminal:
sudo sh -c 'echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes'
sudo sh -c 'echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes'
Add this to some kind of startup script and forget about transfer problems…
How to watch file count in a directory (Linux/macOS)?
If you want to monitor file count in some directory simply use this:
watch "ls -A | wc -l"
You can also mask specific files using asterisk char:
watch "ls sess* -A | wc -l"
If you get Argument list too long error, please change command syntax to this:
watch "ls -U | grep -c '^sess'"
Screenshot from console on Raspberry Pi
I’m building a fleet of distributed Raspberry multimedia players and I’ve decided to start with a few terminal commands to manage them.
Let’s begin with a screenshot of current screen contents.
Continue reading Screenshot from console on Raspberry PiGlitching omxplayer when using -o local (analog audio)
When your omxplayer glitches (audio too fast, video hiccups) simply use both instead of local:
/usr/bin/omxplayer --loop -o both media.mp4
Maybe this will save you some time that I’ve lost to discover that 🙂
Bulletproof method of how to convert Raspberry Pi into kiosk
I’ve tried lots of tutorials but nothing seems to work with newer versions of Raspbian. So I’ve decided to write my own simple tutorial on this matter.
Continue reading Bulletproof method of how to convert Raspberry Pi into kiosk
Easiest way to headless Debian
This article will provide instructions for anyone interested in using headless Debian (or any derivatives).
Problems with internet connectivity on Debian guest
When you’re experiencing problems with internet connection on VirtualBoxe’s guest hosts. double check your gateway settings. Here are commands that may help you:
ip route del default ip route add default via [gateway address] dev [device name]
And to list available interfaces:
ip address
How to unfreeze KDE’s plasmashell?
I’m using Debian 9.4 and this freaking KDE5 is freezing very often! What you can do when your desktop stops responding? Restart computer? Use ALT+CTRL+F1…12? Nah! There’s a better solution!
Simply edit your ~/.bash_aliases:
nano ~/.bash_aliases
And append to it:
alias restart-plasma='kquitapp5 plasmashell && kstart plasmashell'
Now whenever your plasma desktop starts trolling you, go to your console and type restart-plasma voilà! Dezombified!
PS. Use tilda to open console in every shitty situation you’ll get into! Simply press F12 and you’ll get nice Quake like terminal.
Quick optimization of jpeg files in a directory (Linux bash)
Firstly install jpegoptim.
You can do this on Debian like systems using apt:
sudo apt-get update && sudo apt-get install jpegoptim
Then go to directory with jpeg files and use this command:
find . -name '*.jpg' -exec jpegoptim -m70 -o -f --strip-all {} \;
It will find all jpg files recursively and optimize with following settings:
- m70 stands for jpeg quality (about 70 – 80 should be fine but lossy)
- o is for overwrite
- f is for force
- strip-all removes all EXIF and other textual data from files