- Download these files to a folder
- Go to http://downloader.soundcloud.ruud.ninja/
- Authorise via SoundCloud login
- Paste
gettracklinks.browser.js
into the browser console - Paste the clipboard into
alltracks.json
- Run
node getallfiles.js
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
let url = new URL(window.location); | |
let authuser = url.searchParams.get('authuser'); | |
// Log in as the account you always want to be logged-in as | |
// and replace 1 here with the authuser=N number in the url. | |
if (!authuser) { | |
url.searchParams.set('authuser', '1'); | |
window.history.replaceState(null, null, url.toString()); | |
window.location.reload; | |
} |
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
sed -n '/DOCTYPE/,/<\/html>/p;' $1 | perl -pe 's/=\r\n//g' | perl -pe 's/3D//g' | perl -pe 's/=[A-Z\d]{2}//g' |
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
package main | |
type DynamicEntity map[string]interface{} | |
func (d *DynamicEntity) Load(props []datastore.Property) error { | |
loadMap(*d, props) | |
return nil | |
} | |
func loadMap(m map[string]interface{}, props []datastore.Property) { |
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
(function() { | |
function getRgbArray(color, alpha) { | |
// Always return an array, either empty or filled. | |
var rgb = []; | |
var hex; | |
// Get an array of rgb(a) values. | |
if (color.substr(0, 1) === '#') { | |
/* HEX STRING */ | |
// If the first character is # we're dealing with a hex string. Get |
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
// Select an element in the inspector, then paste this into the console. | |
function textNodesUnder(el){ | |
var n, a=[], walk=document.createTreeWalker(el,NodeFilter.SHOW_TEXT,null,false); | |
while(n=walk.nextNode()) a.push(n); | |
return a; | |
} | |
function notAllWhitespace(value) { | |
return !value.match(/^\s*$/g); |
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:(function (el) { if (!el) { throw new Error('no el'); } var text = el.innerText; if (!text) { throw new Error('no text for', el); } var rAll = /Step #(\d+)/; var match = function (s, r) { var m = s.match(r); return m && m[1]; }; var steps = {}; var lines = []; text.split('\n').forEach(s => { var m = match(s, rAll); if (!m) { lines.push(s); } else if (!steps[m]) { steps[m] = [s]; } else { steps[m].push(s); } }); Object.keys(steps).map(ns => parseInt(ns, 10)).sort((a,b) => a-b).forEach(n => { lines.push(steps[n].join('\n')) }); el.innerText = lines.join('\n'); })(document.querySelector('pre')); |
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
# Assumes you are inside your GOPATH | |
for pkg in $(go list ./...); do | |
curr_dir_as_pkg=${PWD/$GOPATH\/src\//} | |
pkd_dir=${pkg/$curr_dir_as_pkg/} | |
if [ -z "$pkd_dir" ]; then | |
continue | |
fi | |
pkg_dir=${pkd_dir/\//} | |
name=${pkd_dir//\//-} | |
covfile=coverage$name.out |
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
#!/usr/bin/env node | |
console.log("nothing to do") | |
process.exit(0) |
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
// Altered from http://stackoverflow.com/a/38311061/3150057 | |
const fs = require('fs'); | |
const sharp = require('sharp'); | |
const takeElementScreenshot = function (element, name) { | |
return protractor.promise | |
.all([ | |
element.getLocation(), | |
element.getSize(), | |
browser.takeScreenshot() | |
]) |
NewerOlder