Skip to content

Instantly share code, notes, and snippets.

View zachbrowne's full-sized avatar

Zach Browne zachbrowne

View GitHub Profile
@zachbrowne
zachbrowne / gist:b82c916174df2d42a7fe
Created September 9, 2015 00:36
Install MATE Deskop 15.04 VPS
sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install mate-desktop-environment
sudo apt-get install x2goserver x2goserver-xsession
login with root or user credentials
@zachbrowne
zachbrowne / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zachbrowne
zachbrowne / Ubuntu Commands
Last active January 1, 2016 07:39
List of useful Ubuntu commands to discover information about the server.
Handy bash commands for finding out stuff in Linux:
# Clean up webserver permissions
find /var/www/* -type d -exec chmod 755 {} \; && find /var/www/* -type f -exec chmod 644 {} \; && chown -R www-data:www-data /var/www/*
# Add User and Add to Sudo
adduser zach
usermod -a -G sudo exampleuser
# Find CPU specifications
@zachbrowne
zachbrowne / .bashrc
Created July 31, 2013 13:51
Custom .bashrc File for Ubuntu
PS1='\[\033[1;31m\]\W/\[\033[0m\] '
##### DEFAULTS #####
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
PROMPT_COLOR='35;1m'
export HISTCONTROL=ignoreboth
@zachbrowne
zachbrowne / gist:6113052
Last active April 6, 2016 17:36
Ubuntu Server 12.04 Setup Script With Optimization of Apache/Postfix with Gmail
#!/bin/bash
#############################################################
# Setup Ubuntu 12.04 32/64 Natty Web Server for WordPress #
# by Zach Browne - http://zachbrowne.com #
#############################################################
## Setup SSH
mkdir ~/.ssh/
@zachbrowne
zachbrowne / instructions.txt
Created June 16, 2013 23:39
Setup Octopress
git clone git://github.com/imathis/octopress.git zachbrowne.github.io
cd zachbrowne.github.io
bundle install
rake install
rake setup_github_pages
rake generate
rake deploy
git init
git remote add origin https://github.com/zachbrowne/zachbrowne.github.com.git
git config branch.master.remote origin
@zachbrowne
zachbrowne / installation.txt
Last active June 14, 2016 07:15
Install FreeNX on Ubuntu Server
sudo apt update && sudo apt -y upgrade
sudo apt install software-properties-common python-software-properties
sudo apt update
sudo apt-add-repository -y ppa:x2go/stable ppa:freenx-team/ppa ppa:ubuntu-mate-dev/ppa ppa:ubuntu-mate-dev/trusty-mate
sudo apt update
sudo apt install install gnome-session-fallback mate-desktop-environment-extras freenx freenx-server
# download the installation script
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz
@zachbrowne
zachbrowne / custom.css
Last active December 16, 2015 09:28
Custom CSS for PE
/* Home Contact
------------------------------------------------------------ */
#home-contact {
width: 100%;
background-color: #f1f1f1;
border-bottom: 1px solid #bbb;
clear: both;
margin: 0 auto;
overflow: hidden;
@zachbrowne
zachbrowne / add.sql
Created April 8, 2013 19:26
Add External Host to MySQL Database
GRANT ALL ON DATABASE.* TO USER@'IP_ADDRESS' IDENTIFIED BY 'PASSWORD';
@zachbrowne
zachbrowne / htaccess.txt
Created December 11, 2012 16:16
.htaccess for SEO
# Accompanies this blog post:
# http://www.seomoz.org/blog/htaccess-file-snippets-for-seos
# NOTE: This file isn't designed to be used all together, some of the rules will conflict,
# it is meant more as a copy and paste board.
# IMPORTANT: Make sure you test .htaccess changes thoroughly, as it can be easy to make mistakes
# and then you end up in a bad place!
RewriteEngine On