Skip to content

Instantly share code, notes, and snippets.

@safizn
Last active March 12, 2017 23:23
Show Gist options
  • Save safizn/867c07371ced5c5bba93fad4a189065a to your computer and use it in GitHub Desktop.
Save safizn/867c07371ced5c5bba93fad4a189065a to your computer and use it in GitHub Desktop.
# Node.js
# update
apt-get update
npm update -g
# Remove all unsaved packages
npm prune
# Using Debian, as root
sudo curl -sL https://deb.nodesource.com/setup_5.x | bash -
sudo apt-get update
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
sudo apt-get install -y nodejs
sudo apt-get install npm
# then updated using http://stackoverflow.com/questions/8191459/how-to-update-node-js
#update system debian:
sudo apt-get update
# Fetches the list of available updates
sudo apt-get upgrade
# Strictly upgrades the current packages
sudo apt-get dist-upgrade
# Installs updates (new ones)
#update all globally installed packages of npm
npm update -g
# updates all package.json dependencies which are marked to be updated (Not a fixed version)
npm update <--save/--save-dev>
# check outdated dependencies:
npm outdated
# Update packages in package.json file
npm install -g npm-check-updates
npm-check-updates -u
npm install
# Install packages:
npm install <--production/--dev>
# check globally installed npm packages
npm list -g --depth=0
Tools:
• browser-sync
• # web components tester: npm i -g web-component-tester web-component-tester-istanbul
# add virtual host:
a2ensite <virtualHostConfigurationFileName>
#enable module
a2enmod <module>
# Restart apache
service apache2 restart
# OR
/etc/init.d/apache2 restart
#check if configuration apache2 works
sudo apache2ctl configtest
# Check settings for virtual host
sudo apachectl -t -D DUMP_VHOSTS
# check modules
sudo apachectl -t -D DUMP_MODULES
#check status
service apache2 status
# service apache2 -l status Usage: apache2 {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean}
# Install bower using Node.js
sudo npm install -g bower
# Direct to a desired folder using cd
sudo bower init --allow-root
# created .bowerrc file in the same folder of the JSON bower to change default bower components directory.
# Bower install
bower install <package> --save
# update
sudo bower update --allow-root
# Update
composer update
# Use composer self-update --rollback to return to version that is locked in the file.
# Git
sudo apt-get install git-all
# Gulp installation
sudo npm install gulp -g
#gulp packages :
# https://gist.github.com/HPieters/88dd18e99c8925b2cabb
# https://ahmadawais.com/my-advanced-gulp-workflow-for-wordpress-themes/
# JSPM
sudo npm install --global jspm
sudo npm install --global jspm-bower-endpoint
jspm registry create bower jspm-bower-endpoint
# install plugin
jspm install css
jspm install html=github:Hypercubed/systemjs-plugin-html
# update
jspm update
# mysql clear cache
rm -rf ~/.mysql_history
mysql -u <user> -p <password>
RESET QUERY CACHE;
FLUSH QUERY CACHE;
# http://www.liquidweb.com/kb/how-to-back-up-mysql-databases-from-the-command-line/
mysql -u <user> -p <pass>
# create backups for sql database.
mysqldump -u <user> -p <databaseName> > <file.sql>
# use this then add code:
mysqldump -u <user> -p --all-databases > all_databases.sql
#View mysql variables
SHOW VARIABLES;
# Not used https://bjornjohansen.no/upgrade-to-php7
# Not iused http://askubuntu.com/questions/593433/error-sudo-add-apt-repository-command-not-found/593437
# used - https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
# before update my external ip http://130.211.49.171/
# sudo apt-get install software-properties-common
# sudo add-apt-repository ppa:ondrej/php
# update produced 404 not found error on one source.
sudo apt-add-repository ppa:ondrej/php-7.0
sudo apt-get update
sudo apt-get install php7.0
# Yeoman installation
sudo npm install -g yo
# install yo generator for polymer starter kit
sudo npm install generator-polymer -g
# https://github.com/yeoman/generator-polymer#readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment