Skip to content

Instantly share code, notes, and snippets.

View zachbrowne's full-sized avatar

Zach Browne zachbrowne

View GitHub Profile
@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
@zachbrowne
zachbrowne / auto-post.php
Created August 9, 2012 06:45
Auto post status updates to Google+
<?php
// REQUIRED PARAMETERS
$status = 'http://www.mylink.com';
$email = 'your@email.com';
$pass = 'yourpassw0rd';
@zachbrowne
zachbrowne / instructions.txt
Created November 1, 2012 19:29
Install Ubuntu Desktop With NoMachine FreeNX on Ubuntu Server 12.04
This is a method to using your Ubuntu 12.04 server without the Unity desktop on a very fast remote desktop program. This is by far the best method to managing your Ubuntu server if you like GUI.
apt-get install --no-install-recommends ubuntu-desktop
apt-get --yes purge unity unity-2d unity-2d-places unity-2d-panel unity-2d-spread
apt-get --yes purge unity-asset-pool unity-services unity-lens-* unity-scope-*
apt-get --yes purge liboverlay-scrollbar*
apt-get --yes purge appmenu-gtk appmenu-gtk3 appmenu-qt
apt-get --yes purge firefox-globalmenu thunderbird-globalmenu
apt-get --yes purge unity-2d-common unity-common
apt-get --yes purge libunity-misc4 libunity-core-5*
@zachbrowne
zachbrowne / backpage-states-rss-feeds-jobs.opml
Created November 13, 2011 18:27
List of Backpage Job RSS Feeds as OPML for US States (Monitor all states for any keyword via RSS)
<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="1.1">
<head>
<title> wordpress </title>
</head>
<body>
<outline text="alabama" version="RSS" xmlUrl="http://alabama.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="alabama.backpage.com/employment/?keyword=seo" />
<outline text="alaska" version="RSS" xmlUrl="http://alaska.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="alaska.backpage.com/employment/?keyword=seo" />
<outline text="arizona" version="RSS" xmlUrl="http://arizona.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="arizona.backpage.com/employment/?keyword=seo" />
<outline text="arkansas" version="RSS" xmlUrl="http://arkansas.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="arkansas.backpage.com/employment/?keyword=seo" />
@zachbrowne
zachbrowne / backpage-jobs.opml
Created November 13, 2011 18:31
Backpage OPML file of All RSS Feeds for "keyword" in Gigs Section
<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="1.1">
<head>
<title>Backpage Jobs for "keyword"</title>
<description>Just find and replace "keyword", import into Google Reader and start your job hunt!</description>
</head>
<body>
<outline text="alabama" version="RSS" xmlUrl="http://alabama.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="alabama.backpage.com/employment/?keyword=seo" />
<outline text="alaska" version="RSS" xmlUrl="http://alaska.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="alaska.backpage.com/employment/?keyword=seo" />
<outline text="arizona" version="RSS" xmlUrl="http://arizona.backpage.com/online/exports/Rss.xml?keyword=seo&section=4373" htmlUrl="arizona.backpage.com/employment/?keyword=seo" />
@zachbrowne
zachbrowne / google-news-parser.php
Created July 11, 2011 03:48
Google News Parser for WordPress
<?php
/*
*
* Plugin Name: Google News Parser
* Plugin URI: http://zachbrowne.com
* Description: Imports news from Google and creates posts for them. For information regarding this
* plugin, please contact the developer: <strong>zachbrowne@gmail.com</strong>
* Version: 1.0
* Author: Zach Browne
apt update; apt -y upgrade; apt -y install sudo nano wget curl git build-essential software-properties-common dnsutils
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
#!/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')
@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