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() {window.open('https://duckduckgo.com/?q=!qr+'+document.URL,'_blank');})() |
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() { | |
const subredditsList = document.querySelector('.subreddits').childNodes; | |
let multiString = ''; | |
subredditsList.forEach(listItem => { | |
const subName = listItem.firstChild.getAttribute('href').slice(3); | |
multiString += subName + '+'; | |
}); | |
const instructions = 'Copy this string and send it to your phone. \n\n\ \ | |
In Alien Blue: \n\n \ | |
1. Tap "Edit" \n \ |
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() { | |
var ul_array = document.getElementsByClassName('subreddits').item(0).children; | |
var multiString = ""; | |
for (var i = 0; i < ul_array.length; i++) { | |
var subName = ul_array[i].firstChild.firstChild.data.slice(3); | |
multiString += subName + "+"; | |
} | |
window.open("http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=" + encodeURIComponent(multiString), '_blank'); | |
})() |
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
// ==UserScript== | |
// @name Filter Pins | |
// @namespace https://gist.github.com/noahleigh/ | |
// @version 3.1.2 | |
// @author Noah Leigh | |
// @description Add buttons that let the user toggle the visibility of certain pins on Pinterest. | |
// @homepage https://gist.github.com/noahleigh/0c71909a860d15ea56fd | |
// @match https://*.pinterest.com/* | |
// ==/UserScript== |
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(){ | |
const regex = /https:\/\/marketplace\.visualstudio\.com\/items\?itemName=([\w-]+).([\w-]+)/; | |
const [, publisher, extensionName] = regex.exec(window.location.href); | |
const version = document.querySelector('table.ux-table-metadata > tbody > tr:nth-child(1) > td:nth-child(2) > div').textContent; | |
prompt( | |
'Open this link in a new tab and save as a .VSIX file:', | |
`https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${extensionName}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage` | |
); | |
})(); |
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 | |
# Download and extract music from http://middle-earth.thehobbit.com/ | |
# Get dmaf JSON file | |
dmaf_assets_url='http://middle-earth.thehobbit.com/stable.380729695375977266/assets/dmaf_assets/' | |
data=$(curl -s "$dmaf_assets_url"json/dmaf_data.json) | |
# Get the section of JSON that we're interested in | |
webaudio_loader_json=$( | |
echo $data | |
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
<# | |
.SYNOPSIS | |
Download and extract music from http://middle-earth.thehobbit.com/ | |
#> | |
# Get dmaf JSON file | |
$dmaf_assets_url = 'http://middle-earth.thehobbit.com/stable.380729695375977266/assets/dmaf_assets/' | |
$data = Invoke-WebRequest -Uri ($dmaf_assets_url + 'json/dmaf_data.json') | ConvertFrom-Json | |
# Get the section of JSON that we're interested in |
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
/** Pass an object with `asker`, `question`, and `details` properties for the given Yahoo Answers | |
* question page URL to the callback function. | |
*/ | |
(function getYahooQuestion(url, callback) { | |
/** Error to throw when a user data ID cannot be found. */ | |
class NoUserDataIdError extends Error { | |
constructor() { | |
super(); | |
this.name = 'NoUserDataIdError'; |
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 python3 | |
'''Dowload the comic *On a Sunbeam*''' | |
import shutil | |
from urllib.parse import urljoin, urlparse | |
from os.path import basename | |
import requests | |
from bs4 import BeautifulSoup | |
def get_chapter_links(url): |
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 undefinedSin() { | |
// Save the original sine function | |
const originalSin = Math.sin; | |
// Encapsulate a scaled sine function | |
const sinScaled = function sinScaled(value, xScale, yScale) { | |
return originalSin((value * Math.PI) / xScale) * yScale; | |
}; | |
// Function that returns a graph formed by the string representation of the input |
OlderNewer