Skip to content

Instantly share code, notes, and snippets.

View powerlanguage's full-sized avatar

Josh Wardle powerlanguage

View GitHub Profile
@powerlanguage
powerlanguage / vanilla-web-component.code-snippets
Created March 12, 2024 02:39
VSCode Snippet for scaffolding webcomponents
{
// Filename transformations: https://gist.github.com/natemoo-re/94cfba2bfb17cbeec0680c05309ea9ee
"Scaffold web component": {
"scope": "javascript,typescript",
"prefix": "wc",
"body": [
"const template = document.createElement('template');",
"template.innerHTML = $BLOCK_COMMENT_START HTML $BLOCK_COMMENT_END `<style></style><div></div>`",
"",
"export class ${TM_FILENAME_BASE/(\\w+)?[-_\\s]+(\\w+)/${1:/capitalize}${2:/capitalize}/g} extends HTMLElement {",
@powerlanguage
powerlanguage / anagramming-privacy-policy.md
Created March 2, 2024 23:33
Anagramming Privacy Policy

This application does not collect or store personal data.

If you installed this application from Google Play, then Google Play does collect some personal data. Please see the privacy policy for Google Play Services here: https://policies.google.com/privacy

@powerlanguage
powerlanguage / auto-refresher.ts
Last active November 14, 2023 17:21
Web component that forces a page refresh after a set period of time
const KEY = "rendered-at";
// 30 mins
const DEFAULT_STALE = 1000 * 60 * 30;
// Check every min
const DEFAULT_INTERVAL = 1000 * 60;
class AutoRefresher extends HTMLElement {
interval: number;
stale: number;
intervalId: number;
for(let i = 97; i <= 122; i++) {
for(let j = 97; j <= 122; j++) {
for(let k = 97; k <= 122; k++) {
console.log(
`${String.fromCharCode(i)}${String.fromCharCode(j)}${String.fromCharCode(k)}`.toUpperCase()
)
}
}
}
const categories = document.querySelectorAll("section.category");
const tshirts = Array.from(categories).filter(
category => category.querySelector("h3").innerText === "T-SHIRTS"
);
const tshirtList = tshirts.querySelector("ul");
// do stuff looping over the list of tshirts

Keybase proof

I hereby claim:

  • I am powerlanguage on github.
  • I am powerlanguage (https://keybase.io/powerlanguage) on keybase.
  • I have a public key whose fingerprint is 74D0 DCBD 4F61 2E3E DD14 7644 0387 AC01 A14C 4DAA

To claim this, I am signing this object:

1

Firstly, this video is for the beta and will quickly become outdated as we make changes to modmail. However, because so much has changed in this version i thought it’d be easier to show you the new functionality directly, rather than simply tell you about it.

2

This is the current Reddit modmail system. It is a hack built on top of messaging which in itself is a hack on top of commenting. This means it has limited functionality and is hard to build features for.

3

@powerlanguage
powerlanguage / gist:f68120ff49816fa8ad95
Created December 31, 2015 05:24
best-of-2015-blog-post-icons.html
<style>
.blogger-clickTrap{
display: none;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
@powerlanguage
powerlanguage / gist:e2c0b8c6967a6b4bc45a
Created December 31, 2015 05:16
best-of-2015-blogpost-orignal.html
<style>ul li { padding: 0px 0px; }</style>
<p>It's the last day of the year 2015, and it's been a heck of a year for Reddit, Inc. We're once again wrapping up the year, simultaneously mourning that we still don't have hoverboards, whilst thanking our lucky stars we didn't end up <a href="http://i.imgur.com/5aqKSij.jpg">actually dressing like this</a>.</p>
<p>In 2015, we saw:</p>
<h2>Reddit.com</h2>
<ul>
<li>82.54 billion pageviews</li>
<li>73.15 million submissions</li>
<li>725.85 million comments:</li>
@powerlanguage
powerlanguage / wikis.md
Created November 23, 2015 16:58
wikis for r/autyspodcasts

[Radiolab - Ice Cold Case] (http://www.radiolab.org/story/ice-cold-case/) -A story about OTZI the preserved body of an ancient man.

[Ideas - Tinctors foul manual] (http://podcast.cbc.ca/mp3/podcasts/ideas_20140424_13198.mp3) -Tinctor's Foul Manual (Encore May 13, 2013) Our ideas about witches and witch hunts may come from an extraordinary manuscript found in the University of Alberta Library. It's one of only four known copies. Written in the 1400s, it created the framework for the inquisition.

[SYSK - How the Spanish Inquisition Worked] (http://www.stuffyoushouldknow.com/?s=how+the+spanish+inquisition+worked)

[SYSK - How Salt Works] (http://www.stuffyoushouldknow.com/podcasts/salt-works/)