Custom Javascript bookmarklet and CSS style definitions for customizing the experience of liiga.fi.
More about this in my blog https://hamatti.org/posts/customizing-liiga-fi-experience/.
# Adapted from https://gist.github.com/chrisroos/92d4221c47f1396d0e76 | |
# - added exclusion of images (in Markdown, ![alt](url) is an image, [title](url) is a link) | |
# - modified from [title][url] format to [title](url) format | |
# --no-filename cleans filenames from output when grepping from multiple sources | |
# --only-matching=1 shows only the first capture group (in my case, the URL) | |
pcregrep --no-filename --only-matching=1 "(?<\!\!)\[.*?\]\((.*?)\)" ~/Documents/Juhisland/003\ -\ Projects/002\ -\ Syntax\ Error/Issues/*.md | sort | uniq |
/** | |
* A bookmarklet to highlight teams in standings in Liiga.fi | |
* You can use https://caiorss.github.io/bookmarklet-maker/ to turn this into a minified bookmarklet | |
* | |
* This works best when combined with custom CSS (I use Stylus extension for that) which hides everything | |
* except schedule and standings. See liiga.css. | |
*/ | |
/** | |
* Injects our custom stylesheet into the `<head>` |
/* Create and open extension page type of "panel" | |
function openForm() { | |
const createData = { | |
type: "panel", | |
url: "extensionPage.html", | |
width: 250, | |
height: 250 | |
}; | |
browser.windows.create(createData); | |
} |
Custom Javascript bookmarklet and CSS style definitions for customizing the experience of liiga.fi.
More about this in my blog https://hamatti.org/posts/customizing-liiga-fi-experience/.
const Discord = require('discord.js'); | |
const cron = require('cron'); | |
const client = new Discord.Client(); | |
client.login(process.env.BOT_TOKEN); | |
const job = new cron.CronJob("00 00 10 * * *", () => { | |
client.channels.cache.get("[channel id]").send("Tick tock"); | |
}); |
class Card: | |
def __init__(self, id, name, supertype, subtype): | |
self.id = id | |
self.name = name | |
self.supertype = supertype | |
self.subtype = subtype | |
def play_card(card): | |
match card: |
class Card: | |
def __init__(self, id, name, supertype, subtype): | |
self.id = id | |
self.name = name | |
self.supertype = supertype | |
self.subtype = subtype | |
charizard = Card('ex3-100', 'Charizard', 'Pokemon', 'Stage 2') | |
lapras = Card('ex3-103', 'Lapras', 'Pokemon', 'Basic') | |
muscle_band = Card('xy1-121', 'Muscle Band', 'Trainer', 'Item') |
// This bookmarklet is for removing the live chat from YLE Areena | |
// Copy-paste the line below into the URL field of a new bookmark | |
javascript:(function() { document.getElementById('yle-livefeed').remove() })() |
/** | |
* @author Juha-Matti Santala / @hamatti | |
* | |
* This code is a bookmarklet that adds support to ON24.com's presentator view for arrow right/left and page down/up keys | |
* to switch slides. | |
* | |
* If your presentation clicker sends different keys to the computer when clicking next/prev, you can adjust the code by | |
* changing the if clauses | |
*/ |
# You can find out your display id with displayplacer list | |
# Find displayplacer at https://github.com/jakehilborn/displayplacer | |
alias asusportrait='displayplacer "id:[your_display_id] degree:90 origin:(1920, 0)"' | |
alias asuslandscape='displayplacer "id:[your_display_id] degree:0 origin:(1920, 0)"' |