This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean up webserver permissions | |
alias fix='sudo find /var/www/* -type d -exec sudo chmod 755 {} \; && sudo find /var/www/* -type f -exec sudo chmod 644 {} \; && sudo chown -R www-data:www-data /var/www/*' | |
# Add User and Add to Sudo | |
adduser zach | |
usermod -a -G sudo exampleuser | |
CREATE DATABASE database; | |
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/bash.bashrc | |
# | |
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt | |
# | |
# This file is sourced by all *interactive* bash shells on startup, | |
# including some apparently interactive shells such as scp and rcp | |
# that can't tolerate any output. So make sure this doesn't display | |
# anything or bad things will happen ! | |
# Test for an interactive shell. There is no need to set anything |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>The Ultimate Bad Ass VIM Cheat Sheet by Zach Browne</title> | |
<meta name="viewport" content="width=device-width"> | |
<meta name="description" content="The Ultimate Bad Ass VIM Cheat Sheet"> | |
<link rel="canonical" href="http://zachbrowne.me/"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update; apt -y upgrade; apt -y install sudo nano wget curl git build-essential software-properties-common dnsutils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iatest=$(expr index "$-" i) | |
####################################################### | |
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
####################################################### | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I solved this on 12.10 by editing /etc/gai.conf and uncommenting the line: | |
# | |
# For sites which prefer IPv4 connections change the last line to | |
# | |
precedence ::ffff:0:0/96 100 | |
# Problems in Fedora | |
touch /etc/modprobe.d/disableipv6.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################################### | |
# LAMP setup for Ubuntu 16.04 Server # | |
# Apache + PHP + Percona # | |
############################################################################################### | |
# Update and prepare server | |
apt update; apt -y upgrade | |
apt -y install nano sudo curl wget git dnsutils lynx | |
sudo hostname srv.zdb.bz | |
sudo service hostname start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'Checking for a new Java Version...' | |
kern_arch=$(uname -r | sed 's/.*-\(.*\)/\1/') | |
if [ "$kern_arch" = amd64 ]; then | |
java_ver=' x64' | |
fi | |
current_version=$(java -version 2>&1 >/dev/null | sed -n '1s/.*"\([^"]*\)"/\1/p') | |
latest_version_url=$(curl https://www.java.com/en/download/manual.jsp 2>/dev/null | grep -Po -m 1 "href=\"\K[^\"]*(?=.*Linux${java_ver} en JRE)" | |
) | |
latest_version=$(curl $latest_version_url 2>/dev/null | sed -n 's/.*File=jre-\([0-9]\)u\([0-9]\{2\}\).*/1.\1.0_\2/p') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
admin account info" filetype:log | |
!Host=*.* intext:enc_UserPassword=* ext:pcf | |
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd | |
"AutoCreate=TRUE password=*" | |
"http://*:*@www” domainname | |
"index of/" "ws_ftp.ini" "parent directory" | |
"liveice configuration file" ext:cfg -site:sourceforge.net | |
"parent directory" +proftpdpasswd | |
Duclassified" -site:duware.com "DUware All Rights reserved" | |
duclassmate" -site:duware.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Update | |
sudo apt-get update && sudo apt-get upgrade -y | |
## Update Hostname | |
echo "server" > /etc/hostname | |
hostname -F /etc/hostname | |
## Update hosts File |
NewerOlder