Skip to content

Instantly share code, notes, and snippets.

@wiyoe
wiyoe / directives.txt
Created March 8, 2018 10:12
Ubuntu phpmyadmin install and not found error solving,
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04
https://askubuntu.com/questions/387062/how-to-solve-the-phpmyadmin-not-found-issue-after-upgrading-php-and-apache
sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0
sudo systemctl restart apache2
@wiyoe
wiyoe / directives.txt
Last active March 8, 2018 10:06
Ubuntu mysqli PHP 7
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php7.0-mysql
@wiyoe
wiyoe / directives.txt
Last active March 8, 2018 08:56
Ubuntu Install Laravel
lsb_release -a
sudo chmod -R 777 /var/lib
sudo chmod -R 777 /var/cache
apt update && apt upgrade
apt install php-mcrypt php-gd php-mbstring
# Install php-xml
sudo apt-get install php-xml
# Install composer
@wiyoe
wiyoe / directives.txt
Created March 8, 2018 08:27
Ubuntu Install Composer
sudo apt-get update
sudo apt-get install curl
sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer
@wiyoe
wiyoe / directives.txt
Created March 8, 2018 08:20
Ubuntu Install PHP 7
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
sudo apt-get install php7.0-mysql
@wiyoe
wiyoe / directives.txt
Created March 8, 2018 07:02
Install latest LTS version of Node.js on Ubuntu 16.04
sudo apt update && sudo apt upgrade -y
lsb_release -a
sudo apt-get install -y build-essential
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
@wiyoe
wiyoe / chmod.txt
Created March 7, 2018 13:00
Ubuntu chmod 777
sudo chmod -R 777 /var/lib/jenkins/secrets
@wiyoe
wiyoe / package.json
Created March 1, 2018 07:02
Webpack package.json scripts.
"scripts": {
"start": "webpack --config webpack.config.js",
"build": "webpack -p --config webpack.config.js"
}
@wiyoe
wiyoe / php-artisan.txt
Created February 28, 2018 07:31
PHP Artisan.
php artisan migrate:fresh --seed
\ \ \ \
\ \ \ `-- Call seeders.
\ \ `-- Drop all tables and run migrations.
\ `-- General command.
`-- ?
@wiyoe
wiyoe / array-to-oject-with-key.js
Created February 26, 2018 13:21
Javascript array to Object with Key
const peopleArray = [
{ id: 123, name: "dave", age: 23 },
{ id: 456, name: "chris", age: 23 },
{ id: 789, name: "bob", age: 23 },
{ id: 101, name: "tom", age: 23 },
{ id: 102, name: "tim", age: 23 }
];
const arrayToObject = (array, keyField) =>
array.reduce((obj, item) => {