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
/* XBOX GAME PASS LIST PAGE | |
https://www.xbox.com/en-US/xbox-game-pass/games | |
*/ | |
// Scrape XBGP Data (run on each page) | |
var titles = [...document.getElementsByClassName("x1GameName")].map(a => a.innerText.replace(/( - Windows 10 Edition)|( - Xbox One Edition)|( - Windows 10)|( for Windows 10)|( \(Windows\))/, '')); | |
var availability = [...[...[...document.getElementsByClassName("availability")]].map(a => a.getElementsByClassName("c-glyph"))].map(a => [...a].map(b => b.ariaLabel)); | |
var gpMap = JSON.parse(window.localStorage.getItem("xbgp", gpMap) || '{}'); | |
for(var i = 0; i < titles.length; i++) { |
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
// Persistently apply using an extension like Styler Pro | |
// https://chrome.google.com/webstore/detail/styler-pro/hbhkfnpodhdcaophahpkiflechaoddoi | |
// Blur text in message preview | |
._3tBW6 { | |
color: transparent; | |
text-shadow: 0 0 4px rgba(0,0,0,0.5); | |
} | |
// Blur emojis in message preview |
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
// Scripts to extract the text of article body for various websites | |
// gematsu.com | |
[...[...document.getElementsByClassName("post_content")][0].children].map(p => p.innerText).join('\n\n') | |
// venturebeat.com | |
[...[...document.getElementsByClassName("article-content")][0].children].map(p => p.innerText).join('\n\n') | |
// ign.com (partially working, some texts are not enclosed in any tags/elements and are not caught by below) | |
[...[...document.getElementsByClassName("article-page")][0].children].map(p => p.innerText).join('\n\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
<!-- This file goes in 'src/assets/migration.html' --> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Migration Example</title> | |
<base href="/" /> |
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
# Automation for Dhuhr, Asr, Maghrib, and Isha Adhan | |
- action: | |
- alias: '' | |
data: | |
entity_id: media_player.family_room_speaker # replace with your Google Home's id | |
media_content_id: https://www.youtube.com/watch?v=ADLO-Hm_nCQ # replace with your choice of Adhan | |
media_content_type: audio/youtube | |
service: media_extractor.play_media | |
- data: | |
entity_id: media_player.family_room_speaker # replace with your Google Home's id |
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
import json | |
from datetime import datetime, timedelta | |
try: | |
from urllib.request import Request, urlopen # Python 3 | |
except ImportError: | |
from urllib2 import Request, urlopen # Python 2 | |
def convertTime(salatTime, offset): | |
salatTime = datetime.strptime(salatTime, '%I:%M %p') |
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
@echo off | |
SET st3fqfn=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3fqfn%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3fqfn% \"%%1\"" /f | |
pause |
NewerOlder