Search This Blog

Labels

adobe (1) android (3) apache (3) aviation (1) bash (2) chrome (2) composer (1) cookery (3) dev (2) dodanperks (1) extensions (1) facebook (2) firefox (1) git (2) grafana (1) guzzle (1) headaches (11) htaccess (1) html5 (2) jquery (2) lamp (1) life hacks (10) linux (28) mysqli (2) native (1) opera (2) php (10) railfanning (1) reactjs (3) reactnative (1) servers (11) sinhala (1) smartphones (2) snap (1) sound (1) tech (22) troubleshoots (4) ubuntu (29) unicode (4) virtualbox (1) wamp (2) web (11) windows (4) wordpress (3) youtube (2) කෑම (3)

Tuesday, 24 September 2024

Apache2/PHP increase upload file size

Edit the php.ini Use a standard text editor to open
/etc/php/apache2/php.ini
, search for the following variables and change/increase these to (as desired but a general guideline is mentioned):
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 100M
Some more values to change if you want a better performance of your web server:
max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
Save and close the editor/file and restart the apache web server with:
service apache2 restart
or
systemctl restart apache2

Sunday, 22 September 2024

Ubuntu 24.04.1 - libadwaita apps can't detect dark mode - fix

Found solution here on Stackoverflow. Open /etc/environment
sudo nano /etc/environment
Then add the following line to the end of it.
ADW_DEBUG_COLOR_SCHEME=prefer-dark
Save it and source it,
source /etc/environment
Logout and Login. Should libadwaita apps work in dark mode now.

Wednesday, 4 September 2024

Getting started with developing Grafana Plugins - Without Docker - The easy way

Grafana has its own Tutorial for this but it's complex and intimidating for a beginner. 

Here's my "easy way" of doing this.

Scaffolding

Get Grafana scaffolding for plugin development with,

npx @grafana/create-plugin@latest

It will ask you a couple of questions before it populates the basic stuff you need to start.

First run

Get to the folder it creates with the boilerplate code; and then run,

npm run build
to build your plugin. Then copy and paste the
dist
folder to your plugins folder after renaming it with the following format
{company_name}-{plugin_id}-{plugin_type}
. (On Linux/Ubuntu it is
/var/lib/grafana/plugins
. Find out where it is on yours)

Working with unsigned plugins

This won't show on your Grafana plugins library before you sign it. If you want to test the plugin before signing, you can edit the
grafana.ini
file to enable it for unsigned plugins.
app_mode = development

More details on allowing unsigned plugins can be found here.

Check if it works

Restart Grafana to see your changes
sudo systemctl restart grafana-server
Make sure you sign the plugin before you publish or turn off the development mode.

Tested on Grafana version: Version 11.2.0 locally installed on Ubuntu 22.04.4 without Docker.

Monday, 13 May 2024

Convert all mp4 files in a folder to mp3

Dependancies:
ffmpeg
for i in *.mp4; do ffmpeg -i "$i" "${i%.*}.mp3"; done
Change parameters or file extensions as you need on the go.

NOTE:
You can use the same for other conversions as well, like FLAC to MP3;
for file in *.flac; do ffmpeg -i "$file" -ab 320k -map_metadata 0 -id3v2_version 3 "${file%.flac}.mp3"; done

NOTE2:
"${i%.*}.mp3"
and
"${file%.flac}.mp3
do the same thing on bash

Tested on Ubuntu 22.04.4

Sunday, 15 October 2023

VirtualBox: Ctrl + Scroll doesn't zoom in/out on Adobe products

Host: Ubuntu 22.04
Guest: Windows 10

Issue: The Ctrl key works with the mouse scroll wheel on everything else but on Adobe products.

Solution: Try the right Alt (AltGr) key instead of the Ctrl key with the mouse scroll to zoom in/out.

Also check: If any utility software like HP Display Assistant or NVIDIA  (any graphics-related utility software) is working in the background. Those may interfere with the said behaviour as other users have complained.

Source: https://community.adobe.com/

Wednesday, 29 March 2023

Bring back the old gnome-screenshot back to Ubuntu 22.04

You know the new screenshot utility found in Ubuntu 22.04 is annoying right. I found a solution here. Thanks a million to this guy who provided this golden answer. 

This way, you can bring the old gnome-screenshot utility back. 

First, install gnome-screenshot
sudo apt install gnome-screenshot
Then, install xclip
sudo apt install xclip
Then, make a script file containing the following,
#!/bin/bash  
TMPFILE=`mktemp -u /tmp/screenshotclip.XXXXXXXX.png`  
gnome-screenshot -af $TMPFILE && xclip $TMPFILE -selection clipboard -target image/png; rm $TMPFILE || echo "" 
Then, go to keyboard shortcuts, and make a shortcut of your choice for the script. 

I chose the good ol' Ctrl + Shift + PrtScr