When you’re using the Visual Studio Code’s ESLint plugin (with TypeScript), you might get this error in the first character of the document.
Continue reading How to fix VSC ESLint error “The file must be included in at least one of the projects provided”?Working automatic refresh phpMyAdmin bookmarklet
Fix “authentication failed” error in Tower
Sometimes when you use Tower with Beanstalk it shows authentication failed error. This short guide will show you how to quickly fix this on macOS.
Continue reading Fix “authentication failed” error in TowerHow to clone Github repo using SSH
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 SSHHow to downgrade macOS? Instructions with installer links
How to find and install older macOS/OS X versions? If you want to download installer images and downgrade your operating system here you can find some instructions.
Continue reading How to downgrade macOS? Instructions with installer linksDisplay element from the set using probability (Vanilla JS)
This is simple Vanilla JS script that will allow you to show one element from the set using basic percentage probability.
Continue reading Display element from the set using probability (Vanilla JS)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'"
How to run double plank (dock) on Elementary OS Juno?
If none of the other tutorials for double plank (on newest Elementary OS Freya) worked for you please check this post.
Continue reading How to run double plank (dock) on Elementary OS Juno?How to mirror (statically) a website?
If you want to copy a website really really fast use HTTrack with following switches:
httrack http://website.com/ -K --sockets=50 --disable-security-limits --max-rate=0
It works on Linux (there’s a native Debian package) and Windows.
Check documentation for other options. K is very important because it affects link generation. If you want original links without html extensions use it like above.
K option cheatsheet:
βK0 | foo.cgi?q=45 β> foo4B54.html?q=45 (relative URI, default) |
βK | β> http://www.foobar.com/folder/foo.cgi?q=45 (absolute URL) (ββkeepβlinks[=N]) |
βK3 | β> /folder/foo.cgi?q=45 (absolute URI) |
βK4 | β> foo.cgi?q=45 (original URL) |
βK5 | β> http://www.foobar.com/folder/foo4B54.html?q=45 (transparent proxy URL) |
And last but not least…
If you want to rewrite original links to html static links use this:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/$ $1.html RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.html RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ /$1/$2/$3.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule (.*)$ /$1/ [R=301,L]