Menu

Linux

httpie: HTTP GET, POST … requests in console
https://httpie.org/ github Install sudo apt install httpie Sample request http GET http://localhost:4000/api/users http GET :4000/api/users http GET [...]
Run a local server and make it available remotely
Run a local server cd /path/to/your-project-folder # python2 python -m SimpleHTTPServer 8080 # python3 python3 -m http.server 8080 Open a browser and visit [...]
Intro to Elasticsearch
GitHub Page Intro Download Elasticsearch tar https://www.elastic.co/start examples are using version 5.4.1 Extract tar into directory Start elasticsearch [...]
JPG and PNG image optimization on Linux
JPG optimization Download jpegoptim from https://github.com/tjko/jpegoptim git clone git@github.com:tjko/jpegoptim.git Install jpegoptim ./configure make [...]
Udacity: Website Performance Optimization
Udacity Project https://github.com/udacity/frontend-nanodegree-mobile-portfolio Analysis tools https://developers.google.com/speed/pagespeed/insights/ [...]
Location data
http://dev.maxmind.com/geoip/legacy/geolite/ Download GeoLite Country Binary / gzip and unpack it. Usage https://dev.maxmind.com/geoip/legacy/downloadable/ [...]
Local WordPress development on Ubuntu is super easy
If you are tired of changing localhost domain to the correct one before the siteis published this tutorial is for you. We will create a local domain so [...]
Force https in .htaccess
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] Change example.com to your domain name. More info
Downloading files with wget
Download all .jpg files from a web page wget -r -A .jpg http://site.with.images/url/ Gather all links on the page After you gather all needed links in [...]
Access log
Access Log in Apache – Learn how to parse it
There are a couple of ways to parse Apache's access log. It's easiest to examine the file with goaccess or awk, but you can also use python!
Basics of Wireshark
Installation sudo aptitude wireshark Enable capture a traffic as a non-root user using a wireshark setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' [...]
Browse the web using VPN vpnbook – Setup
Here are simple steps that will enable you to browse anonymously / hide your real IP. Go to https://www.vpnbook.com/freevpn Download US1 OpenVPN [...]
Install Anki Flashcards
Installation First download the Compiled package from the Anki official page and execute the following commands: Then execute the following code (make sure [...]
.htaccess
Force https in .htaccess
RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} SOURCE
The structure of Apache Server Log
Apache2 server log is located at /var/log/apache2/access.log. It displays entries like: 127.0.0.1 - - [30/May/2017:11:36:50 +0200] "GET [...]
WordPress Permalinks on Ubuntu Apache Server
I have encountered this interesting issue with WordPress permalinks when I was installing WordPress locally. Everything was fine until I changed WordPress [...]
ApacheBench
Homepage Installation Refresh the package database. sudo apt-get update Install the apache2-utils package to get access to ApacheBench. apt-get install [...]
Download a list of pdfs
To download a list of pdfs, gather the all in one txt file and run the following in the console: wget -i url-list.txt Wait until they are all downloaded. [...]
Ubuntu – issues after restart
Try to reboot into earlier linux image in GRUB. If it works, try to reinstall the faulty version // caution - not tested yet! + change the version! sudo [...]
CentOS7 Install Graphical User Interface
yum groupinstall "GNOME Desktop" "Graphical Administration Tools" ls -sf /lib/systemd/system/runlevel5.target /lib/systemd/system/default.target
Install Wacom tablet
Instructions Prerequisites Before building, you’ll need to ensure the necessary dependencies have been installed on your system: sudo apt-get install [...]
Mounting Second Drive to root
First edit /etc/fstab /dev/sda1 /STORAGE ext4 acl,user_xattr 1 2 Then create new folder and change ownership: cd / sudo mkdir /STORAGE sudo chown -R [...]
Upgrade Ubuntu to new version
https://www.linuxbabe.com/ubuntu/upgrade-ubuntu-16-04-to-ubuntu-16-10 in Software and Updates Select the Updates tab and then at the bottom of window, [...]
Install and Uninstall .deb Packages
Install .deb package sudo dpkg -i DEB_PACKAGE Uninstall .deb package sudo dpkg -r DEB_PACKAGE Reconfigure the package sudo dpkg-reconfigure PACKAGE_NAME
Share files between two Ubuntu computers
sudo apt-get install openssh-server Edit config sudo nano /etc/ssh/sshd_config Change Port 2222 // change from default 22 PermitRootLogin no [...]
Install Stacer on Ubuntu
Stacer is a nice tool for Linux System Optimization adn Monitoring. Instalation Download Stacer from GitHub. Choose .deb file for Ubuntu Then run the [...]
Install PyCharm on Ubuntu
sudo add-apt-repository ppa:mystic-mirage/pycharm && sudo apt-get update && sudo apt-get install pycharm-community Source
Install Atom on Ubuntu
sudo add-apt-repository ppa:webupd8team/atom sudo apt-get update sudo apt-get install atom
Export list of installed programs and install them on another computer (Ubuntu)
Step 1: Store the list of installed packages Run the following command on the source machine to store the installed packages names in ~/pkglist: sudo dpkg [...]
Fix Error: No Bootable Device after Installation on Ubuntu
Enter into Boot menu with F2 РBoot Tab Рmake sure that Secure Boot is turned on РSecurity tab and look for “Select an UEFI file as [...]
Chroot Ubuntu from Live CD
sudo mount /dev/sdXY /mnt sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc [...]
Brackets
Install Brackets on Ubuntu
sudo apt-add-repository ppa:webupd8team/brackets sudo apt-get update sudo apt-get install brackets
Gulp
Install gulp.js on Ubuntu
Installation steps sudo npm install gulp-cli -g sudo npm install gulp -D touch gulpfile.js gulp --help Use gulp with your project Make sure you have files [...]
Install Node.js on Ubuntu
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt install -y nodejs # or curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash [...]
Install LAMP server and phpmyadmin on Ubuntu
Install Lamp server sudo apt-get install lamp-server^ http://localhost/ or http://127.0.0.1/ Restart server sudo /etc/init.d/apache2 restart Install [...]
tmux
sudo apt install tmux sudo yum install tmux To make aliases available in tmux open .bash_profile and add source ~/.bashrc
Generate ssh keys
ssh-keygen -t rsa -b 4096 ssh-copy-id -i ~/.ssh/kcq_stage.pub kcqstage@companion.dreamhost.com ssh kcqstage@companion.dreamhost.com Setup for github ls -al [...]
Install mysqldump (Database backup program) on Ubuntu
sudo apt-get install mysql-client
Install wpscan on Ubuntu
sudo apt-get install libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential libgmp-dev zlib1g-dev su -l cd ~ curl -sSL [...]
Install wp-cli
Project homepage: https://github.com/wp-cli/wp-cli $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar $ php wp-cli.phar [...]
Cheat Install
What you do when you are not sure of the command you are running especially in case of complex commands which uses a lot of options. We use man pages to [...]
Install CentOS 7 on VirtualBox
First enable/add NatNetwork and Host only Network in VirtualBox Interface File > Preferences > Network If Host-only adapter gives error on Windows go to [...]
Install VirtualBox 5.1 on Ubuntu 16.4
Option 1 with Guest additions Link to iso http://download.virtualbox.org/virtualbox/5.1.14/ sudo apt-key adv --keyserver ha.pool.sks-keyservers.net [...]