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
/* open up chrome dev tools (Menu > More tools > Developer tools) | |
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading) | |
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR | |
* open up JS console and enter: var har = [paste] | |
* (pasting could take a while if there's a lot of requests) | |
* paste the following JS code into the console | |
* copy the output, paste into a text file | |
* open up a terminal in same directory as text file, then: wget -i [that file] | |
*/ |
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
LEGEND: | |
= Match | |
_ No canonical URL found in either | |
~ Both requests failed | |
X Mismatch | |
========================================================================X=XXXX====================== ✔ {"domain":"www.marketwatch.com"} | |
======_===============~===========================================_=====_=~_=================_=====X ✔ {"domain":"nymag.com"} | |
____________________________________________________________________________________________________ ✖ {"domain":"luufy.com"} | |
===__________=====X====_===========___==============_====_______===__===============_=____=_======== ✔ {"domain":"www.zazzle.com"} |
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
<?php | |
$image_dir = '/wp-content/uploads/fadeshow/'; | |
$images = array( | |
'pillow-pile.jpg', | |
'gold-couch.jpg', | |
'shade-and-swag.jpg', | |
'barrel-chair.jpg', | |
'roman-shades.jpg', | |
'blue-sofa.jpg', |
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
// using https://github.com/MathieuLoutre/grunt-aws-s3 | |
aws_s3: { | |
options: { | |
accessKeyId: '<%= aws.key %>', | |
secretAccessKey: '<%= aws.secret %>', | |
// putting no region makes it default to US Standard | |
// debug: true, // do a dry run | |
uploadConcurrency: 5 | |
}, |
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
<!-- More info at http://stackoverflow.com/questions/25595930/youtube-api-v3-over-http-post-cant-set-snippet-while-uploading-a-video-title/ --> | |
<form id="upload-yt-video" action="https://www.googleapis.com/upload/youtube/v3/videos?part=snippet&access_token=YOUR_TOKEN_HERE" method="post" enctype="multipart/form-data"> | |
<input type="text" name="title" placeholder="Video title"> | |
<textarea name="description" placeholder="Video description"></textarea> | |
<input type="file" accept="video/*" name="videoFile"> | |
<input type="submit" value="Upload Video"> | |
</form> | |
<!-- load jQuery --> |
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
/* Vice Magazine Headline Generator script | |
Author: David Alexander (ddly.co / @deadlydizzle) | |
Version: 1.0 September 1, 2014 | |
License: GNU General Public License, version 3.0 (GPLv3) | |
*/ | |
// Tell JSLint's 'defined but never used' error to take a hike | |
/* exported setHeadline */ |
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
; Start a new pool named 'www'. | |
; the variable $pool can we used in any directive and will be replaced by the | |
; pool name ('www' here) | |
[thegenerationsproject.info] | |
; Per pool prefix | |
; It only applies on the following directives: | |
; - 'access.log' | |
; - 'slowlog' | |
; - 'listen' (unixsocket) |
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
#!/bin/bash | |
# Minimum available memory limit, MB | |
THRESHOLD=1024 | |
# Check time interval, sec | |
INTERVAL=60 | |
while : | |
do |
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 dupesFound = 0; | |
var elements = Array.from(document.querySelectorAll('.js-link-block')) | |
elements.map(function (element) { | |
var nameElement = element.querySelector('.chartlist-name') | |
return nameElement && nameElement.textContent.replace(/\s+/g, ' ').trim() | |
}).forEach(function (name, i, names) { | |
if (name !== names[i + 1]) return | |
var deleteButton = elements[i].querySelector('[data-ajax-form-sets-state="deleted"]') | |
if (deleteButton) { | |
dupesFound++; |
OlderNewer