Skip to content

Instantly share code, notes, and snippets.

View son0fhobs's full-sized avatar

David son0fhobs

View GitHub Profile
@son0fhobs
son0fhobs / FireGesturesSearch.js
Created August 22, 2011 21:55
Firegestures - Search Google w/in Past Year
/**
* Author:
* David Hobson
* http://www.virtualidstudios.com
*
* Goal: Update Google Search to within past year
* Details:
* While on Google Search Page.
* Changing Search options with a Gesture. Current one changes search to within year.
*
@son0fhobs
son0fhobs / gist:1210334
Created September 12, 2011 00:06
Wordpress Hotkey. Publish Post with firegesture or Bookmarklet
/*
* Author:
* David Hobson
* http://www.virtualidstudios.com
*
* Goal: In Wordpress Publish Post with Hotkey or Gesture
* Details:
* Setup for Firegestures, or script for Bookmarklet.
* Use appropriate hotkey method per browser to activate bookmarklet
*
@son0fhobs
son0fhobs / RemoveHTML5.py
Created September 21, 2011 08:39
Remove HTML5 Elements and turn into Div's of that class
# Removes HTML5 elements
# Python regex to turn all html5 elements into div with classes of the same name
# Ex. <section> would become <div class="section">
# Do a Python regular expression replace, full support of Python regular expressions
editor.pyreplace(r'(\<(footer|section|article|header|nav)([^>]*)\>)', r'<div \3>')
#changes </tag> to </div>
@son0fhobs
son0fhobs / SERPs-scrap-SEO-Quake-Data
Last active August 29, 2015 13:57
Scrape SEO Quake Results, convert to JSON
/* THIS NEEDS TO BE MODIFIED TO ACTUALLY RUN IN SERPS */
/*
// It requires seoquake extension to be ready, and it still needs to import jquery in no conflict to work. This is for testing currently.
*/
// appending 2 csv - split(/\r\n/), loop through arrays adding lines, then join('\r\n');
var seo_quake_val = '"Url";"Google pagerank";"Google index";"SEMrush links";"SEMrush linkdomain";"Bing index";"Alexa rank";"Webarchive age";"Whois";"Page source";"SEMrush Rank"\r\n"http://www.fourthchurch.org/";"4";"4,130";"385";"938";"n/a";"1687507";"December 1, 1998";"whois";"source";"n/a"\r\n"http://www.chicagopresbytery.org/church-list/";"2";"4,020";"1";"442";"n/a";"n/a";"October 13, 1999";"whois";"source";"n/a"\r\n"http://www.chicagopresbytery.org/";"4";"4,020";"308";"442";"n/a";"n/a";"October 13, 1999";"whois";"source";"n/a"\r\n"http://www.covenantchicago.org/";"3";"57";"147";"158";"n/a";"n/a";"April 29, 2001";"whois";"source";"n/a"\r\n"http://en.wikipedia.org/wiki/Fourth_Presbyterian_Church_(Chicago)";"0"
@son0fhobs
son0fhobs / load-jQuery-in-Google-Serps-Mozbar-Scraping
Last active August 29, 2015 13:57
Load jQuery in Google SERPs & Mozbar Scraping
// *** Selector - instead find moz iframe, then .closest('li') for more reliability
// *** Work with Oop Version and Test Driven Development
/*
Default save
@son0fhobs
son0fhobs / useless-Moz-API-Bookmarklet
Last active August 29, 2015 13:57
Use serp scrape instead - Moz Free API in Serps
/* Still a work in progress */
// Never mind $('#search iframe').src has all the vals I need Gah!!!
// Snap. Make the call to my own server, passing in all the necessary serp info, then the php request to Moz.
@son0fhobs
son0fhobs / convert-html-table-to-json
Last active April 7, 2016 02:41
HTML Table to json
// check for jQuery, load 1.9.1 if not there
// csv to json - other gist.
// html to json - this gist
// json to csv and download - https://gist.github.com/Sikwan/4326948
// json to table - ? - setup datatables php to js. filters and all? Booya.
// combine all these into a single object?
if(typeof jQuery !== 'function'){
// even/odd, classes, filters
var args = {
tableId:'',
firstRowHeaders:false,
}
function generate_html_table(data, args){
if(data === 'undefined' || !data || !data[0]){
return 'No Vals set. Ensure it's array or array of objects, or json string';
@son0fhobs
son0fhobs / serps-compare-title-and-search-term
Last active August 29, 2015 13:57
SERPs - Rating title by search term match
// stop words listed at end
// parse, then filter out empty ones. Remove apostrphes both from stop words and search term
// Value based on if term exists and how close it is to the beginning, based on linear weight.
var search_term = 'seo serp bookmarklet';
var serp_title = 'my seo serp bookmarklet for title value';
// remove stop words
search_term = remove_stop_words(search_term);
@son0fhobs
son0fhobs / html-table-data-visualization
Last active August 29, 2015 13:57
HTML Table Data Visualization
/*
// Tabelizer for Contract Table? - http://www.jqueryrain.com/?pl_6d8jV
// CSS flow! - Snippets - http://www.cssflow.com/snippets/
// better wordcloud - https://github.com/lucaong/jQCloud
// navigation and options styles awesomeness - codepen