Skip to content

Instantly share code, notes, and snippets.

@hopskipnfall
hopskipnfall / delete_tweets.js
Last active April 15, 2023 09:25
Deletes tweets from tweetdeck.twitter.com
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms || 330));
}
async function deleteNextTweet() {
// click overflow button for next tweet
document.querySelector('[role="article"]').querySelector('[aria-label="More"]').click();
await sleep();
@hopskipnfall
hopskipnfall / README.md
Last active June 20, 2016 05:12
Playlist Scraper for Dubtrack

Playlist Scraper for Dubtrack

This is my super hacky script to make it easy to export your playlist to a spreadsheet.

Instructions:

  1. Open up your Chrome Developer Console (windows: ctrl + shift + j, OSX: cmd + option + j).
  2. Open up your desired playlist and scroll all the way down in it so that the list fully loads in your browser. Make sure you scroll all the way to the bottom or it'll probably miss some.
  3. Paste the code in scraper.js into the Console tab of the Developer Console and hit ENTER.
@hopskipnfall
hopskipnfall / iterateQueue.js
Created September 27, 2014 21:44
Iterate over queue with a delay
/**
* Iterates over a queue, calling the callback function at regular intervals
* defined by delay (in miliseconds)
*/
function iterate(queue, callback, delay) {
var timer = setInterval(function() {
if(queue.length <= 0) {
clearInterval(timer); // Finished iterating
}
// Extract and act on the next item
@hopskipnfall
hopskipnfall / ajax.js
Created May 12, 2014 03:30
PHP AJAX Example
function Ajax() {
this.post = function(targetUrl, jsonData, successCallback, errorCallback) {
$.ajax({
type: "POST",
url: targetUrl,
data: jsonData,
success: successCallback,
error: errorCallback
@hopskipnfall
hopskipnfall / gist:75f3a73181afacf36c14
Last active August 29, 2015 13:59
Custom command for Bold in LaTex
% Create \B{some text here} as an alias for \textbf{some text here}
\newcommand{\B}[1]{\textbf{#1}}
\B{some text here}