sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
# Colors for the prompt | |
blue="\033[0;34m" | |
white="\033[0;37m" | |
green="\033[0;32m" | |
# Brackets needed around non-printable characters in PS1 | |
ps1_blue='\['"$blue"'\]' | |
ps1_green='\['"$green"'\]' | |
ps1_white='\['"$white"'\]' |
<?php | |
private function get_random_bytes($nb_bytes = 32) | |
{ | |
$bytes = openssl_random_pseudo_bytes($nb_bytes, $strong); | |
if (false !== $bytes && true === $strong) { | |
return $bytes; | |
} | |
else { | |
throw new \Exception("Unable to generate secure token from OpenSSL."); | |
} |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
parameters | |
--level=psr2 --verbose fix $FileDir$/$FileName$ | |
working directory | |
$ProjectFileDir$ |
/.composer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
--rules=@PSR2 --verbose fix $FileDir$/$FileName$
. Note that previous verions of PHP-CS-Fixer used --levels
instead of --rules
.$ProjectFileDir$
Click OK and Apply. Now we'll set up a shortcut.
ctrl + cmd + ]
:When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.
Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts
file on your host machine where we will keep a single set of DNS entires to our test web application(s).
Original post : https://unix.stackexchange.com/a/310699
nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
There are two main modes to run the Let's Encrypt client (called Certbot
):
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com
.
HTML is served from /var/www/mydomain
, and challenges are served from /var/www/letsencrypt
.