find ./ -type f -exec sed -i 's/string1/string2/g' {} ;
find ./ -type f -exec sed -i 's/string1/string2/gI' {} ;
find . -type f -exec sed -i 's+http://example.com+https://example.com+g' {} +
chmod 700 ~/.ssh | |
chmod 644 ~/.ssh/authorized_keys | |
chmod 644 ~/.ssh/known_hosts | |
chmod 644 ~/.ssh/config | |
chmod 600 ~/.ssh/id_rsa | |
chmod 644 ~/.ssh/id_rsa.pub |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa |
#!/usr/bin/env bash | |
# vim: ai ts=2 sw=2 et sts=2 ft=sh | |
# Check OS. | |
# if [[ ! "${OSTYPE}" =~ "^linux" ]] || [[ ! "$(lsb_release -c 2>/dev/null)" =~ "xenial" ]]; then | |
# (>&2 echo "Error: This script is for Ubuntu 16.04 LTS (xenial) not '${OSTYPE}'.") | |
# exit 1; | |
# fi | |
sudo apt-get update |
https://www.digitalocean.com/community/tutorials/how-to-set-up-an-object-storage-server-using-minio-on-ubuntu-16-04 |
mysql_config_editor set --login-path=local --host=localhost --user=root --password | |
mysqldump --login-path=local --no-data --skip-triggers microfinance > microfinance.sql | |
mysqldump --login-path=local --no-create-db --no-create-info --skip-triggers microfinance >> microfinance.sql | |
mysqldump --login-path=local --no-create-db --no-create-info --no-data --routines --triggers --skip-opt microfinance >> microfinance.sql |
df -h | |
dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
mkswap /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo 'echo "/swapfile none swap defaults 0 0" >> /etc/fstab' | sudo sh | |
free -m |
server { | |
server_name server_name example-live.com www.example-live.com; | |
set $mobile_rewrite do_not_perform; | |
# this regex string is actually much longer to match more mobile devices | |
if ($http_user_agent ~* "|android|ip(ad|hone|od)|kindle") { | |
set $mobile_rewrite perform; | |
} |
find ./ -type f -exec sed -i 's/string1/string2/g' {} ;
find ./ -type f -exec sed -i 's/string1/string2/gI' {} ;
find . -type f -exec sed -i 's+http://example.com+https://example.com+g' {} +
#!/bin/bash | |
cd /tmp || exit | |
echo "Downloading Postman ..." | |
wget -q https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz | |
tar -xzf postman.tar.gz | |
rm postman.tar.gz | |
echo "Installing to opt..." | |
if [ -d "/opt/Postman" ];then | |
sudo rm -rf /opt/Postman |