Simply drag it to your bookmarks:
Refresh phpMyAdminAnd that’s all ๐
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 TowerThere’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…
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'"
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]
Use this method to show message to logged user on remote computer:
psexec64 -s /user:domain\user -i \\[remote_computer] cmd /c "msg * < \\[computer]\share\message.txt"
Message from shared text file will be outputted on remote computer.
You can add template id’s to debug your Grav website. Check that:
{% extends 'partials/base.html.twig' %}
{% block body %}
{% for module in page.collection() %}
<!-- @begin_template: {{ module.template }} -->
{{ module.content|raw }}
<!-- @end_template: {{ module.template }} -->
{% endfor %}
{% endblock %}
Will output:
I needed a very simple SQL table with application log. After sometime I’ve realized that it already has 80 MB of data (sic!). What can you do with logs? Well, answer is simple! Use rotation. Below you can find quick SQL solution for removing old entries.
If you’re an admin in a windows environment you can troll your friends a little bit ๐
Install psexecย and use bellow command to run Rick Astley’sย famous “sweet troll of mine” on a remote computer (background, no window!).
psexec64 -s /user:domain\user -i \\xxx.xxx.xxx.xxx "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="https://youtu.be/dQw4w9WgXcQ"
xxx.xxx.xxx.xxx โ stands for an ip number of a trolled person.
PS. Make sure you’re using psexec64 not psexec because it may not work on modern systems (tested on Windows 10).
If you’re a fan of Firefox (mainly because it’s an awesome tool for webdevelopment) like me. You should already know that there’s an additional console for developers (I’ve did not until five minutes ago). When you press Shift + F2 it shows little input bar on the bottom of the window. For example type the following command :
screenshot --clipboard --fullpage
Press Enter and BANG! Screenshot of a entire page in your MEMORY!
Mother of God… This is so awesome!
PS. Try different commands, you can use Tab for completion and help to list them all.