Skip to content

Instantly share code, notes, and snippets.

@Caedilla
Caedilla / Filter.js
Last active June 8, 2021 22:38
IFTTT Youtube liked video to Spotify playlist filter
// Removes stuff from YouTube video names to make it easier to find the song on Spotify
// Add this to the filter section of your IFTTT applet after the Youtube Trigger, before Spotify.
// Spotify title in the applet settings can be whatever (so long as it's not empty) this replaces it.
var title = Youtube.newLikedVideo.Title
// Some videos use a dash or colon instead of hyphen.
var titleSplit = title.split('-')
if (titleSplit.length != 2){
titleSplit = title.split('–')
@Caedilla
Caedilla / userChrome.css
Created October 14, 2019 03:14
Change Github Favicon to white when using dark mode.
.bookmark-item[label="Github"] image {
width:0!important;
height:0!important;
padding: 0 0 16px 16px !important;
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGzmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC
@Caedilla
Caedilla / DirectoryList.ps1
Created October 20, 2019 21:55
Dump a list of file paths into a text file on the desktop
$desktop = [Environment]::GetFolderPath("Desktop")
$outputFilePath = "$desktop\Directory.txt"
$dirList = "//film-tvserier/3D Film","//film-tvserier/Film","//film-tvserier/TV"
for($i=0;$i-lt $dirList.Length; $i++){
gci -Path $dirList[$i] -r -af -exclude *.nfo,*.txt,*.srt,*.sub,*.jpg,*.png,*.exe,*.db,*.old | % fullname | Out-File -Append -FilePath $outputFilePath
}
@Caedilla
Caedilla / SearchNumber.js
Created February 28, 2023 19:04
Find a good phone number. Searches page for a number with repeating digits, and then searches the rest of the value for more repeating digits.
const firstRepeating = /(\d)\1{1,2}/;
const checkRepeating = /(\d)\1{1,2}/;
const selectElements = document.getElementsByTagName('select');
let matchingValues = '';
for (const selectElement of selectElements) {
const matchingOptions = selectElement.getElementsByTagName('option');
for (const option of matchingOptions) {
const value = option.value;