Skip to content

Instantly share code, notes, and snippets.

View pfgithub's full-sized avatar
💭
Typing a status

pfg pfgithub

💭
Typing a status
View GitHub Profile
@pfgithub
pfgithub / get_belled_channels.js
Created December 16, 2017 23:08
Get all belled channels on youtube
// Visit https://www.youtube.com/subscription_manager
let vals = [];
Array.from(document.getElementsByClassName("yt-uix-subscription-notifications-all")).forEach((bellicon) => {
vals.push(bellicon.parentNode.parentNode.parentNode.childNodes[0].childNodes[0].childNodes[0].getAttribute("href").replace("/channel/", "")/*replace first instance*/);
});
vals
@pfgithub
pfgithub / solutions.js
Last active December 5, 2017 05:25
Advent of Code Solutions 2017
// 1
function getcaptcha(digits){
let count = 0;
digits.split("").forEach((digit, i,ds) => {
let nextDigit = ds[i+1] || ds[0];
if(digit == nextDigit) count += parseInt(digit, 10);
});
return count;
}
@pfgithub
pfgithub / app.js
Last active November 15, 2015 02:04
const wm = require('./api/windowman.js');
console.log(wm);
var window = new wm.Window("My window");