I've tried so much times install GoAccess. For this reason, i create this gist to make your job easy.
Don't skip the steps:
$ sudo su
# cd /usr/local/src
Download ffmpeg
from here, download *-win64-gpl.zip
for Windows.
Install ffmpeg
for Ubuntu
sudo apt install ffmpeg
Below command will give you a log file. If no error found, the log file will be empty.
#!/usr/bin/env bash | |
# | |
# Script to create MySQL db + user | |
# | |
# @author Karel Wintersky <karel.wintersky@gmail.com> | |
# @version 0.2 | |
# mysql_config_editor set --login-path=proftpd --host=localhost --user=proftpd --password | |
#!/bin/bash | |
# Logging utility that simplifies user of bash logger command | |
# # First source the script | |
# source ~/scripts/logr.bash | |
# # Start the logger, generates log name from scripts filename | |
# logr start | |
# # or define your own | |
# logr start LOG_NAME |
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
Incomplete
2018-08-23 04:10 EDT
<?php | |
/** | |
* getRandomWeightedElement() | |
* Utility function for getting random values with weighting. | |
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50) | |
* An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%. | |
* The return value is the array key, A, B, or C in this case. Note that the values assigned | |
* do not have to be percentages. The values are simply relative to each other. If one value | |
* weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66% | |
* chance of being selected. Also note that weights should be integers. |
DROP PROCEDURE IF EXISTS descend; | |
CREATE PROCEDURE descend(uid INT, depth INT) BEGIN | |
DROP TABLE IF EXISTS descendants; | |
DROP TABLE IF EXISTS children; | |
CREATE TEMPORARY TABLE descendants ( | |
id int, | |
parent_id int, | |
level int | |
) ENGINE = MEMORY; | |
INSERT INTO descendants(id, level) |