Skip to content

Instantly share code, notes, and snippets.

View powerlanguage's full-sized avatar

Josh Wardle powerlanguage

View GitHub Profile
if [ -f /home/reddit/src/reddit-plugin-gold/reddit_gold/../Makefile ]; then make -C /home/reddit/src/reddit-plugin-gold/reddit_gold/../ static; fi
cp -r --preserve=timestamps /home/reddit/src/reddit-plugin-gold/reddit_gold/public/* build/public/
touch build/plugin-gold-buildstamp
rm -f build/public/static/gold.css
lessc build/public/static/css/gold.less > build/public/static/gold.css.tmp
python r2/lib/contrib/rcssmin.py < build/public/static/gold.css.tmp > build/public/static/gold.css
rm build/public/static/gold.css.tmp
# remove mangled output symlinks, similar to above.
rm -f /home/reddit/src/reddit/r2/build/public/static/gold.js
paster run standalone r2/lib/js.py -c "build_module('gold')"
@powerlanguage
powerlanguage / gist:cba176e952395af13dd1
Last active August 29, 2015 14:05
Gunpoint Mac Beta crash
Process: GunpointSteam [58414]
Path: /Users/USER/Library/Application Support/Steam/*/GunpointSteam.app/Contents/MacOS/GunpointSteam
Identifier: com.abstractiongames.GunpointSteam
Version: 1.0 (1)
Code Type: X86 (Native)
Parent Process: launchd [267]
Responsible: GunpointSteam [58414]
User ID: 501
Date/Time: 2014-08-23 17:08:56.036 -0700
@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/)

@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 / 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;
}

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

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:

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
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()
)
}
}
}
@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;