Skip to content

Instantly share code, notes, and snippets.

@nd3w
nd3w / install-nginx-mariadb-phpfpm-on-ubuntu-20.04.md
Last active March 19, 2025 01:47
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.

First fetch the latest package list of Ubuntu:

$ sudo apt update
@tareqy
tareqy / my.cnf
Created March 9, 2016 16:27
Starter MySQL config file for a server with 8GB RAM, innodb and MyISAM.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
key_buffer_size=32M
query_cache_type=1
query_cache_size=4M
query_cache_limit=24M
tmp_table_size=128M
max_heap_table_size=128M
innodb_buffer_pool_size = 4000M
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\cmdhere]
@="Cmd Here"
[HKEY_CLASSES_ROOT\*\shell\cmdhere\command]
@="cmd.exe /c start cmd.exe /k color 02 & pushd \"%L\\..\""
[HKEY_CLASSES_ROOT\Folder\shell\cmdhere]
@="Cmd Here"
@roylory
roylory / mediaQuery.js
Last active November 17, 2019 08:11
Media query with Bootstrap grid classes in Javascript
mediaQuery = (function() {
// Same as in bootstrap/_variables.less
// var screenXs = 480; // Not used
var screenSm = 768;
var screenMd = 992;
var screenLg = 1200;
var screenXsMax = screenSm - 1;
var screenSmMax = screenMd - 1;
@PizzaBrandon
PizzaBrandon / jquery.waituntilexists.js
Last active August 24, 2023 14:23 — forked from buu700/jquery.waituntilexists.js
Updated waitUntilExists plugin
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@grevory
grevory / html5-starter.html
Last active July 8, 2024 21:47
HTML5 Starter Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Starter Template</title>
<meta name="description" content="Starter Template">
<meta name="author" content="Gregry Pike">
<link rel="stylesheet" href="css/styles.css?v=1.0">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@nunoveloso
nunoveloso / nuno_php_array_ops.php
Created March 7, 2012 12:34
PHP array operations up to 10x faster than the original
/**
* Home mande method to do array_diff ~10x faster that PHP built-in.
*
* @param The array to compare from
* @param An array to compare against
*
* @return an array containing all the entries from array1 that are not present in array2.
*/
function nuno_array_diff($array1, $array2) {
$diff = array();