Skip to content

Instantly share code, notes, and snippets.

@son0fhobs
son0fhobs / datatables-scripts.js
Last active May 26, 2018
Datatables Inactive Ingredients
View datatables-scripts.js
/*
// 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.
Misc
spinning pill: http://v3.preloaders.net/en/science/pill-spinning/
@son0fhobs
son0fhobs / ingredients-scraper.php
Last active May 9, 2018
Scrape Drug Ingredients
View ingredients-scraper.php
<?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.
@son0fhobs
son0fhobs / breath.html
Created Jan 11, 2018
Breathing CSS Animation
View breath.html
<!-- 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/
View Putlocker-autoscript.js
$=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 / putlocker-all.js
Last active Mar 16, 2016
Putlocker General
View putlocker-all.js
// 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
*/
View putlocker-shows.js
/* 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 / html_tables.class.php
Last active Aug 29, 2015
HTML Table Generator
View html_tables.class.php
<?php
/*
Advantages
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
son0fhobs / single-element.js
Last active Apr 22, 2016
Show only selected video
View single-element.js
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 / save_plugin_states
Last active Aug 29, 2015
Save active wordpress plugin - When deactivating for troubleshooting
View save_plugin_states
/* Find the active plugins, save to array */
$=jQuery;
plugin_states = [];
$('.row-actions-visible').each(function(i){
// save state which is set as class "activate" or "deactivate"
plugin_state_class = $(this).children().eq(0).attr('class');
plugin_states.push(plugin_state_class);
});
@son0fhobs
son0fhobs / putlocker.is
Last active Aug 29, 2015
putlocker.is bookmarklet
View putlocker.is
// more thorough explanation and version to share: http://jsfiddle.net/ydj56zy3/5/
/*
// 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.
Bookmarklet: