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
/* | |
DeepLoad: | |
Fetch any number of pages via AJAX for infinite scroll-like functionality. | |
First visit the site you want and put this into your browser console. | |
ToDo: | |
0. Determing page structure (where in the url should the page numbers need to be plugged in) from pages where the url doesn't have page structure yet (eg: homepage) | |
1. User can customize by passing arguments to the "get" function | |
2. resume a broken DeepLoad. Find if DOM has been modified by a previous DeepLoad run and start resuming from where the previous run left off | |
3. remove jquery dependency |
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
/* | |
DeepLoad: | |
Fetch any number of pages via AJAX for infinite scroll-like functionality. | |
First visit the site you want and put this into your browser console. | |
ToDo: | |
2. resume a broken DeepLoad. Find if DOM has been modified by a previous DeepLoad run and start resuming from where the previous run left off | |
3. remove jquery dependency | |
4. convert it into a bookmarklet | |
5. make a youtube video tutorial and spread word about DeepLoad around |
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
// Bookmarklet | |
javascript:(function() { | |
var a = document.createElement('a'), img_src = document.getElementsByClassName( 'the_photo' )[0].src; | |
a.href = img_src; | |
a.download = document.getElementsByClassName('name')[0].innerText + ' by ' + document.getElementsByClassName('author_name')[0].innerText + '.' + img_src.split('.').pop(); | |
document.body.appendChild(a); | |
a.click(); | |
})(); |
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
var s = document.createElement( 'script' ); | |
s.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'; | |
document.body.appendChild( s ); // load jQuery | |
var | |
screen_name = "qtbrowneyes" | |
, this_many_tweets = 40; | |
function getTweets( screen_name, this_many_tweets ) { | |
$.getJSON( 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' + screen_name + '&callback=?&count=' + this_many_tweets + '', |
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
/* | |
Simple tutorial on talking to the Dropbox API using Node.js and MongoDB. | |
This is an educational exercise aimed to help you get up and running on localhost, but the production code, | |
though not that different from what's below, will make an extra effort to handle edge cases like if the user | |
denies us access to their Dropbox. | |
Code tested on Windows 8 (32-bit) |
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
javascript:window.location.href = document.getElementById( 'allsizes-photo' ).children[1].src |
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
var s = document.createElement( 'script' ) | |
s.src = 'http://code.jquery.com/jquery-1.8.0.min.js' | |
document.body.appendChild( s ) // load jQuery | |
var current=6, target = 150; | |
function load( url ) { | |
$.get( url, function( data ) { | |
$( '#i4' ).before( $( '#i3', data ).html() ) | |
current++ |
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
<html> | |
<head> | |
<style type="text/css"> | |
body { font-family: sans-serif; font-size: 13px; } | |
</style> | |
</head> | |
<body> | |
<div id="container"> | |
<div id="content"> |
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
ls *.mp4 -l | awk '{total += $5} END {print total}' |
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
// iStock ▽ | |
javascript:(function() {var a = document.createElement('a'), img_src = document.getElementById('s3img').children[0].src; a.href = img_src; a.download = img_src.split('/').pop(); document.body.appendChild(a); a.click();})(); | |
// 500px ▽ | |
javascript:(function() { var a = document.createElement('a'), img_src = document.getElementsByClassName('the_photo')[0].src; a.href = img_src; a.download = document.getElementsByClassName('name')[0].innerText + ' by ' + document.getElementsByClassName('author_name')[0].innerText + '.' + img_src.split('.').pop(); document.body.appendChild(a); a.click();})(); | |
// Pinterest ▽ | |
javascript:(function() { var a = document.createElement('a'), img_src = document.getElementsByClassName('pinImage')[0].src; a.href = img_src; a.download = document.getElementsByClassName('commentDescriptionContent')[0].innerText + '.' + img_src.split('.').pop(); document.body.appendChild(a); a.click();})(); |
OlderNewer