Skip to content

Instantly share code, notes, and snippets.


Disabling webcam on Linux

sudo modprobe -r uvcvideo

Enabling webcam on Linux

sudo modprobe uvcvideo
nd3w / Youtube Iframe
Created Mar 25, 2021
Iframe without right click, etc, could be work for Youtube addresses only.
View Youtube Iframe
class="c-hero-media__video js-hero-player"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
title="YouTube video player"
View My Linux Setting Collection
Turn on touchpad: xinput set-prop 15 "Device Enabled" 1
Turn off touchpad: xinput set-prop 15 "Device Enabled" 0
nd3w / install-gimp-ppa.txt
Last active Jun 3, 2020
Install GIMP 2.10 on Ubuntu 18.04
View install-gimp-ppa.txt
open a terminal and type:
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp
open a terminal and type:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:otto-kesselgulasch/gimp
nd3w /
Last active May 31, 2020
How to change XFCE panel's of notify and audio icon size

This is a way to change notify and audio icon size for XFCE panel:

Create or edit ~/.config/gtk-3.0/gtk.css, and add these two selectors:

#pulseaudio-button * {
        -gtk-icon-transform: scale(.55);

#xfce4-notification-plugin * {
nd3w /
Last active Oct 7, 2021
How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04

How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04

This is a way to install and set up Nginx, MariaDB and PHP-FPM on Ubuntu 20.04.

NOTE: This has been prepared for ease of use in mind, not security, mostly in development machine. Please do not use these instructions to setup on a public server environment. Use other proper manuals instead.

$ sudo apt update


nd3w /
Last active May 28, 2021
Collection of useful MySQL queries

List of table's names only

    AND `TABLE_NAME`='table name';

Select all rows with the same value

SELECT e1.* FROM employees e1, employees e2 
nd3w / horizontal-vertical-center.html
Last active Dec 5, 2019
Horizontally and vertically center div in a page
View horizontal-vertical-center.html
<!DOCTYPE html>
<title>The Center </title>
<link href=",700" rel="stylesheet">
html, body {
height: 100%;
nd3w / Binding_params.php
Last active Oct 24, 2019
Dynamically binding params in prepared statment
View Binding_params.php
$array = [1,2,3,4,5,6,7];
$count_array = count($array);
$placeholders = implode(',', array_fill(0, $count_array, '?'));
$query = $DB->Prepare('
SELECT id, name
FROM table_name
WHERE id IN (' . $placeholders . ')
nd3w / install-wine4-ubuntu18.04.txt
Last active Oct 29, 2019
Installing Wine 4.0 on Ubuntu 18.04 and Linux Mint 19
View install-wine4-ubuntu18.04.txt
$ sudo dpkg --add-architecture i386
$ sudo apt update
$ wget -qO- | sudo apt-key add -
$ sudo apt-add-repository 'deb bionic main'
$ sudo apt update