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
# 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 |
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
<?php | |
define("EmailNewLine", "\r\n"); | |
define("EmailXMailer", "PHP-EMAIL, Samplephpcodes.com"); | |
//** the default charset values for both text and HTML emails. | |
define("DefaultCharset", "iso-8859-1"); | |
function htmlmail($to, $subject,$content,$cc,$bcc) |
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
// ==UserScript== | |
// @name Google Redirect Remove | |
// @id google_redirect_remove | |
// @namespace scripts.zachbrowne.com | |
// @description Remove URL redirection from google sites | |
// @license GPL v3 | |
// @include *://www.google.*/*q=* | |
// @include *://www.google.*/*tbs=* | |
// @include *://www.google.*/search?* | |
// @include *://www.google.*/webhp?* |
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
<?php | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, '<a class="linkclass" href="http://www.example.com">http://www.example.com</a>'); | |
curl_setopt($ch, CURLOPT_HEADER, 1); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); | |
curl_setopt($ch, CURLOPT_PROXY, 'fakeproxy.com:1080'); | |
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'user:password'); | |
$data = curl_exec(); | |
curl_close($ch); |
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/sh | |
####################################################### | |
# Another great script by: # | |
# _ , _ # | |
# / ) _, _ |) /|/_) ,_ _ _ # | |
# / / | / |/\ | \/ | / \_| | |_/|/| |/ # | |
# /__/\/|_/\__/| |/|(_/ |/\_/ \/ \/ | |_/|_/ # | |
# (| # | |
# # |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<opml version="1.1"> | |
<head> | |
<title>Craigslist Gigs for "keyword"</title> | |
<description>Just find and replace "keyword", import into Google Reader and start your job hunt!</description> | |
<body> | |
<outline text="AK fairbanks - wordpress" description="Search for wordpress in AK fairbanks" title="AK fairbanks - wordpress" type="rss" version="RSS" htmlUrl="http://fairbanks.craigslist.org/search/ggg?query=wordpress" xmlUrl="http://fairbanks.craigslist.org/search/ggg?query=wordpress&format=rss"/> | |
<outline text="AK anchorage - wordpress" description="Search for wordpress in AK anchorage" title="AK anchorage - wordpress" type="rss" version="RSS" htmlUrl="http://anchorage.craigslist.org/search/ggg?query=wordpress" xmlUrl="http://anchorage.craigslist.org/search/ggg?query=wordpress&format=rss"/> | |
<outline text="AK kenai peninsula - wordpress" description="Search for wordpress in AK kenai peninsula" title="AK kenai peninsula - wordpress" type="rss" version="RSS" htm |
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
<?php | |
function getinboundLinks($domain_name) { | |
ini_set('user_agent', 'NameOfAgent (<a class="linkclass" href="http://localhost">http://localhost</a>)'); | |
$url = $domain_name; | |
$url_without_www=str_replace('http://','',$url); | |
$url_without_www=str_replace('www.','',$url_without_www); | |
$url_without_www= str_replace(strstr($url_without_www,'/'),'',$url_without_www); | |
$url_without_www=trim($url_without_www); | |
$input = @file_get_contents($url) or die('Could not access file: $url'); | |
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; |
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
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 |
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
# 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 |