Skip to content

Instantly share code, notes, and snippets.

View son0fhobs's full-sized avatar

David son0fhobs

View GitHub Profile
son0fhobs / datatables-scripts.js
Last active May 26, 2018 17:11
Datatables Inactive Ingredients
// does brand name always have same ingredients? Scrape anyway? Include one with generics?
Where use exipient as keywords? Tagline - Because exipients can be harmful.
row highlight - rgba() in tandum with column highlight. Also on top of table background.
spinning pill:
son0fhobs / ingredients-scraper.php
Last active May 9, 2018 16:13
Scrape Drug Ingredients
Don't do unless relevant - all drugs convert.
All drugs
- 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.
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 -
Breathing. Toggle different patterns. Allow user to enter own.
Count iterations? Include music?
Variations? Colors?
son0fhobs / Putlocker-autoscript.js
Created March 25, 2016 00:53
Putlocker Autoscript
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 = {
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 / putlocker-shows.js
Last active March 15, 2016 01:18
/* show menu */
/* jquerify first */
// bookmarklet
if(typeof jQuery !== 'function'){
var url = '//';
var script = document.createElement('script');
script.src = url;
son0fhobs / html_tables.class.php
Last active August 29, 2015 14:20
HTML Table Generator
Add data in any format. Associative, numberic, multiple rows, single rows, etc
Allows to add data and display in two methods.
Flexibility, extensibility. Any attrs, rows, cells, table, even/odd, etc
Filter rows for flexibility in attrs (row thirds, etc), as well as filter data and attrs based on data
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''%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 / save_plugin_states
Last active August 29, 2015 14:14
Save active wordpress plugin - When deactivating for troubleshooting
/* Find the active plugins, save to array */
plugin_states = [];
// save state which is set as class "activate" or "deactivate"
plugin_state_class = $(this).children().eq(0).attr('class');
son0fhobs /
Last active August 29, 2015 14:12 bookmarklet
// more thorough explanation and version to share:
// variable selector for grabbing ads, extra iframes?
// prompt for selector. Button to add back all elements and try again?
// if nothing else, color background black.
// find table elements as well.