Disabling webcam on Linux
sudo modprobe -r uvcvideo
Enabling webcam on Linux
sudo modprobe uvcvideo
; For dev only | |
expose_php=Off | |
log_errors=On | |
error_log=/var/log/httpd/php_scripts_error.log | |
file_uploads=On | |
;open_basedir="/var/www/html/" | |
error_reporting = E_ALL | |
; Should be 'off' on prod server | |
allow_url_fopen=On |
Get how many rows in whole database | |
SELECT SUM(TABLE_ROWS) | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA = 'db_name'; | |
Assuming I have three different PHP versions on my system: | |
1. PHP 5.6 | |
2. PHP 7.1 | |
3. PHP 7.2 | |
To switch two between versions, add these aliases into your ~/.bashrc file: | |
alias php5671='sudo a2dismod php5.6 ; sudo a2enmod php7.1 ; sudo service apache2 restart ; echo 2 | sudo update-alternatives --config php' | |
alias php5672='sudo a2dismod php5.6 ; sudo a2enmod php7.2 ; sudo service apache2 restart ; echo 3 | sudo update-alternatives --config php' |
<?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 . ') | |
'); |
$ sudo dpkg --add-architecture i386 | |
$ sudo apt update | |
$ wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add - | |
$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main' | |
$ sudo apt update |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>The Center </title> | |
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> | |
<style> | |
html, body { | |
height: 100%; | |
} |
Installing: | |
open a terminal and type: | |
sudo add-apt-repository ppa:otto-kesselgulasch/gimp | |
sudo apt-get update | |
sudo apt-get install gimp | |
Removing: | |
open a terminal and type: | |
sudo apt-get install ppa-purge | |
sudo ppa-purge ppa:otto-kesselgulasch/gimp |
<iframe | |
id="068a380a-add0-4954-b0fb-b25884efab81" | |
class="c-hero-media__video js-hero-player" | |
data-youtube-api="https://www.youtube.com/iframe_api" | |
data-youtube-id="-q7UBPU0MYI" | |
frameborder="0" | |
allowfullscreen="1" | |
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | |
title="YouTube video player" | |
width="100%" |
Disabling webcam on Linux
sudo modprobe -r uvcvideo
Enabling webcam on Linux
sudo modprobe uvcvideo
Version of Nginx
sudo nginx -v
Version and Enabled modules
sudo nginx -V
Configuration test