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 / putlocker-shows.js
Last active March 15, 2016 01:18
putlocker-shows
/* show menu */
/* jquerify first */
// bookmarklet
javascript:(function()%7Bfunction%20jqueryLoaded()%7B%24%3DjQuery%3Bvar%20e%3D%24(%22.content-box%22)%2Cr%3D%24(%22body%22)%3Br.children().remove()%2Cr.append(e)%2Ce.css(%7Bposition%3A%22relative%22%2Cmargin%3A%2240px%20auto%22%7D)%2C%24(%22%5Bid%5E%3DMarketGidScriptRoot%5D%22).nextAll().remove()%2C%24(%22%5Bid%5E%3DMarketGidScriptRoot%5D%22).remove()%2C%24(%22.abineContentPanel%22).remove()%2C_adr%3Dnull%2CantiClickjack%3Dnull%7Dif(%22function%22!%3Dtypeof%20jQuery)%7Bvar%20url%3D%22%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.11.1%2Fjquery.min.js%22%2Cscript%3Ddocument.createElement(%22script%22)%3Bscript.src%3Durl%3Bvar%20head%3Ddocument.getElementsByTagName(%22head%22)%5B0%5D%3Bhead.appendChild(script)%2Cscript.onload%3DjqueryLoaded%7Delse%20jqueryLoaded()%7D)()
if(typeof jQuery !== 'function'){
var url = '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js';
var script = document.createElement('script');
script.src = url;
@son0fhobs
son0fhobs / putlocker-all.js
Last active March 16, 2016 01:34
Putlocker General
// include jQuery, then run the function jqueryLoaded
/*
options - run default to guess for other video sites?
Single element selector option? - make icon to click on?
X button to undo fixes
*/
@son0fhobs
son0fhobs / Putlocker-autoscript.js
Created March 25, 2016 00:53
Putlocker Autoscript
$=jQuery;
jqueryLoaded();
function jqueryLoaded(){
// I made $=jquery global, which isn't the best idea, but it was convenient, and this isn't exactly a huge project
options = {
includeHeader:false
@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'){
@son0fhobs
son0fhobs / single-element.js
Last active April 22, 2016 09:24
Show only selected video
javascript:(function()%7Bif(typeof jQuery!%3D%3D'function')%7Bvar url%3D'%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.11.1%2Fjquery.min.js'%3Bvar script%3Ddocument.createElement('script')%3Bscript.src%3Durl%3Bvar head%3Ddocument.getElementsByTagName('head')%5B0%5D%3Bhead.appendChild(script)%3Bscript.onload%3DjqueryLoaded%7Delse%7BjqueryLoaded()%7Dfunction jqueryLoaded()%7Bremove_overlayed_elems()%3Bget_show_only_selected_elem()%7Dfunction remove_overlayed_elems()%7B%24('*').each(function()%7Bif(%24(this).css('position')%3D%3D'fixed')%7B%24(this).remove()%7D%7D)%7Dfunction get_show_only_selected_elem()%7B%24('body *').on('mouseover mouseout'%2Cfunction(event)%7Bif(event.type%3D%3D'mouseover')%7B%24(this).data('border'%2C%24(this).css('border'))%3B%24(this).css('border'%2C'3px solid rgba(255%2C0%2C0%2C.5)')%7Delse%7B%24(this).css('border'%2C%24(this).data('border'))%7Dreturn false%7D).on('click'%2Cfunction()%7B%24video%3D%24(this)%3Bshow_only_video(%24video)%7D)%3B%24(document).keyup(function(e)%7Bif(e
@son0fhobs
son0fhobs / breath.html
Created January 11, 2018 01:23
Breathing CSS Animation
<!-- Make a breathing animation based on the videos. Advanced options to change background, sound, speed.
Options to choose different breathing patterns, speed, etc.
Codepen - https://www.youtube.com/watch?v=04PgJqJGLQc
Breathing. Toggle different patterns. Allow user to enter own.
Count iterations? Include music?
Variations? Colors?
https://biged.github.io/Box-Breathing/
@son0fhobs
son0fhobs / ingredients-scraper.php
Last active May 9, 2018 16:13
Scrape Drug Ingredients
<?php
/*
Don't do unless relevant - all drugs convert.
All drugs https://www.rxlist.com/drugs/alpha_c.htm
- Scrape each page.
- Doesn't tell you if brand or generic.
- Remove half results, FDA and Multum sources. Compare? Save both?
DailyMed autocomplete ajax? Use that instead. Below for brand to generic searching.