if ( $_SERVER["REQUEST_URI"] == '/' ) {
echo "Only on frontpage";
}
Articles
Installation on Ubuntu 20.04
If you are running with Apache you can install from dpkg. If not, then it's probably better to install from source.
Standard packages: aptitude nano git zip software-properties-common
sudo aptitude update; sudo aptitude dist-upgrade
Web packages old sites: apache2 php5 libapache2-mod-php5 php5-cli php5-mysql php5-gd libphp-pclzip mysql-client mysql-server phpmyadmin libsasl2-modules libsasl2-modules-sql libsasl2-2 sasl2-bin libpam-mysql libfcgi-dev phpmyadmin unzip libxml2
sudo a2enmod rewrite
In the old days we all had CD-drives, but most modern computers these days don't have an optical drive. This makes things even more efficient, because you need to think smart. Some people choose to have an external optical drive, but why all the hassle when you can have a bootable USB or a bootable partition on your harddrive. There ar many guides on the internet, how to get that done manually. Again, why the hasse when we have UNetbootin, the perfect software for booting your favorite ISO's from your harddrive!
Thailand
Lek & Greg Vegan Camp Li Lamphun
-
Lamphun to Lek and Greg Vegan Camp (Nature route).
-
Secret Climb Lek & Greg Vegan Camp
-
Doi Inthanon XXL Li Lek & Greg Vegan Camp
How to find the idling revolutions screw: fhttps://www.youtube.com/watch?v=Od8W0XsRLKA
DIY |How to fix IDLING STOP | honda click v1 and Game changer: https://www.youtube.com/watch?v=W1zil6dHkyA
Many times you need to download files from the internet, specifically when you want to automate a process or two. Here is where wget comes in handy. This is a standard tool on most Linux systems.
In some cases the server you want to download from does a couple of checks, so your automation fails. You can come by that by adding a couple of switches like:
wget --user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" --auth-no-challenge URL_OF_FILE_TO_DOWNLOAD
Wordpress Plugins
https://dev.to/davo20019/how-to-get-100-100-on-google-pagespeed-insight…
Database Cleanup
There are many ways to autamte tidious browser tasks. You can use a plugin for your favorite browser, python, R-Project/R-Studio or another free or proprietary tool. I love R, so my goto place will be Selenium with R called RSelenium.
Links
https://cran.r-project.org/web/packages/RSelenium/RSelenium.pdf
https://cran.r-project.org/web/packages/RSelenium/vignettes/basics.html
When you want to clone into a non empty folder or directory (https://stackoverflow.com/questions/9864728/how-to-get-git-to-clone-int…):
git init .
git remote add -t \* -f origin [repository-URL]
git checkout master
SoapUI is a smart and advanced open source tool to test APIs.
Notes and Resources
Generate Sample XML using a WSDL in SOAP UI: https://www.youtube.com/watch?v=btS84mlJeNo
https://stackoverflow.com/questions/12222607/how-to-do-a-soap-wsdl-web-…
R-Project can be used to parse, build and validate XML files. The xml2 R library is the latest xml parsing library and should be used instead of the outdated xml library.
Install dev version from github:
# install.packages("devtools")
devtools::install_github("r-lib/xml2")Links
Manual: https://rdrr.io/cran/xml2/man/
There are many tools and a lot of software out there to convert PDFs to Word.
Online tools like:
convertio.co
altoconvertpdftoword.com
readlink -e /proc/$(xprop -id $(xdotool getactivewindow) _NET_WM_PID | awk '{print $3}')/cwd
Inspired by: https://superuser.com/questions/1116636/open-a-terminal-from-any-direct…
This might be useful when your machine shuts down unexpectadly under heavy loads: https://github.com/FlyGoat/RyzenAdj
For me it only happens in Windows when the batery is charging too. I think charging thresholds are a must. In linux we have tlp: https://linrunner.de/tlp/ and https://wiki.archlinux.org/index.php/TLP and https://github.com/linrunner/TLP :-D
#Rewrite index.html pages to the root domain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index\.html
RewriteRule ^(.*)index.html$ /$1 [R=301,L]
</IfModule>
#Rewrite index.php to root
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
</IfModule>
Recovering overwritten description (https://help.trello.com/article/783-recovering-the-description-of-a-car…):
https://trello.com/1/cards/[card ID]/actions?filter=updateCard:desc (replace [card ID]).
Info of entire board:
trello.com/boards/BOARD-ID/actions?filter=updateCard:desc
First we open all edit dropdowns:
var links = document.querySelectorAll('[href="#!"]');
for (var i = 0; i < links.length; i++) {
links[i].click();
}
Then we delete all open dialogues:
If you encounter errors when importing or creating tables in MySQL with default date values as zero, then you might want to change your
Check your setting: show variables like 'sql_mode' ;
Set new settings without "NO_ZERO_IN_DATE,NO_ZERO_DATE":
set global sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';