Skip to content

Instantly share code, notes, and snippets.

View zachbrowne's full-sized avatar

Zach Browne zachbrowne

View GitHub Profile
@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 / 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
<HTML>
<head> <title> My RSS Feed </title> </head>
<body>
<?
include 'rss_get.php';
?>
@zachbrowne
zachbrowne / example.css
Created July 16, 2011 17:38
Simple RSS Button with CSS
.feed-button {
padding: 10px 0;
}
.feed-button a {
color: #666;
padding: 10px 15px 10px 36px;
background: #ccc url("../images/feed-icon-14x14.png") no-repeat 15px 50%;
border-top: 1px solid #e2e2e2;
border-right: 1px solid #818181;
@zachbrowne
zachbrowne / example.css
Created July 16, 2011 17:37
Add RSS Icons to a List of Feeds
.feed-list {
margin: 0 0 15px 15px;
padding: 0;
list-style-type: none;
}
.feed-list li {
margin: 0 0 10px 0;
padding: 0;
list-style-type: none;
@zachbrowne
zachbrowne / example.css
Created July 16, 2011 17:24
Add RSS Icon Next to Feed in a Paragraph
.feed {
margin-left: 3px;
padding: 0 0 0 19px;
background: url("../images/feed-icon-14x14.png") no-repeat 0 50%;
}
#!/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
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAxU+tMbtfZgEcPtd9bjLpCDp6LFM8apU0PrqUGYGD66yU5E73rcTUwbrHdPVT+HkYTLBBYZlQ8nki7m8asQq4uPyuoo2LL26ut6ZrCDrkCPcKbPKK75hSfJwjm1LqGTfbKcv112d/uqGUDtCiak0AeWOvoiZbISD2K5IT/dp67W0= rsa-key-20110926
@zachbrowne
zachbrowne / Ubuntu Commands Cheat Sheet
Created September 29, 2011 16:26
A collection of commands and bash script functions for Ubuntu that just make life easier.
# Commands to backup a website from root access to ssh with mysql database
cd to directory of website
# Compress
tar czf filename.tar.gz *
mysqldump -u root -ppassword databasename | gzip -9 > filename.sql.gz
# Decompress
tar xzf filename.tar.gz
gunzip filename.sql.gz
@zachbrowne
zachbrowne / Moving WordPress to Different Domain MYSQL Commands
Created October 8, 2011 03:58
Moving a WordPress website to a different domain MYSQL commands
# Run these three commands when moving your WordPress website from one domain to another
UPDATE wp_options SET option_value = replace(option_value, 'http://old-domain.com', 'http://new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://old-domain.com','http://new-domain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://old-domain.com', 'new-domain.com');