Skip to content

Instantly share code, notes, and snippets.

View jewel-andraia's full-sized avatar
🧜‍♀️
diving back into coding

Jewel Andraia Darger-Sacher jewel-andraia

🧜‍♀️
diving back into coding
View GitHub Profile
filterTitle: function(title, reddit) {
var reddit = (reddit) ? reddit.toLowerCase() : null;
return this.arrayContainsSubstring(this.options.keywords.value, title.toLowerCase(), reddit);
},
filterDomain: function(domain, reddit) {
var reddit = (reddit) ? reddit.toLowerCase() : null;
var domain = (domain) ? domain.toLowerCase() : null;
return this.arrayContainsSubstring(this.options.domains.value, domain, reddit);
},
filterSubreddit: function(subreddit) {
@jewel-andraia
jewel-andraia / aggregators.js
Last active December 10, 2015 23:48
aggregator meta-function for JavaScript
Function.prototype.aggregate = function(initial, array) {
var callback = this;
var val = initial;
for (var i = 0; i < array.length; i++) {
val = callback(val, array[i], key);
}
return val;
}
@jewel-andraia
jewel-andraia / 0 README.md
Last active December 14, 2015 17:29
MutationObserver tests - Firefox 19 - Reddit Enhancement Suite v4.1.5
  1. Declare var MutationObserver in the global scope (i.e. outside of a function) in the plugin

  2. Observe that window.MutationObserver is undefined.
    (In RES v4.1.5, this manifests as MutationObserver == undefined || null == null)

  3. Remove var MutationObserver from the global scope code.

  4. Observe that window.MutationObserver is a constructor function, is truthy, and logs as null unless you cast it a little.
    (After fixing this in RES, this manifests as MutationObserver == the constructor)

@jewel-andraia
jewel-andraia / An-Anonymous-Pen.markdown
Created September 20, 2013 14:58
A Pen by Anonasaurus Rex.
@jewel-andraia
jewel-andraia / honestbleeps.json
Last active December 29, 2015 18:49
include-by-pagetype2 samelawrence vs honestbleeps
This file has been truncated, but you can view the full file.
[
[
"subRedditTagger",
"http://www.reddit.com",
true
],
[
"subRedditTagger",
"http://www.reddit.com?sort=new",
true
@jewel-andraia
jewel-andraia / gist:8888652
Created February 8, 2014 19:15
reddit automoderator rule for AND-matching text
url+body: "reddit.com/r/[^/]+?/comments/"
url+body+body: "/r/pcmasterrace"
modifiers:
url+body: [includes, regex]
url+body+body: inverse
comment: |
To who posted - Content removed. We are currently not allowing direct links to comments in other subreddits to avoid brigading. It protects our users from shadowbans, which are fairly common among voters who follow through links from other subreddits.
@jewel-andraia
jewel-andraia / README.md
Last active December 11, 2021 06:24
@gavin19's RES settings backup script

@gavin19 said...:

I [gavin19] also wrote this very simple Python script that can take a Chrome chrome-extension_kbm..localstorage file as input and output to the Firefox store.json type. Just copy the old Chrome settings file to the same directory as the script and rename to res.db. Running python chrToFF.py should output a valid Firefox-worthy replica.

@jewel-andraia
jewel-andraia / 27-03-2014
Created March 29, 2014 14:24
#enhancement gittip discussion
<patcon> honestbleeps: sorry for unceremoniously janking out of there yesterday, but again, thanks so much for the help with babelext
<patcon> and as for your having gittip's and being totally unaware, yeah, there's an issue for that, whicH i just added you as a +1 to: https://github.com/gittip/www.gittip.com/issues/447
<patcon> :)
<andytuba> haha nice patcon https://github.com/gittip/humans
<SirCmpwn> one of the gittip guys got in touch and convinced us to add gittip donations to mediacrush
<andytuba> although you'd barely know it from looking at your donate page
<patcon> andytuba: heh i'd stumbled across that early on, but forgot. i should ask chad about it?
<patcon> oops. ignore that "?"
<andytuba> github.com/gittip/humans/issues/new : In-joke unclear, please add clarifying commit message =p
<SirCmpwn> andytuba: at some point we'll make that better, we just aren't trying very hard :P
## {{header}}
| \# | Change | Author
| ---| ------ | ------ {{#issues}}{{#closed_by_issue}}
| [#{{number}}]({{html_url}}) | {{title}} (fixes [#{{../number}}]({{../html_url}})) | @{{user.login }}{{/closed_by_issue}}{{#unless closed_by_issue}}
| [#{{number}}]({{html_url}}) | {{title}} | {{#if pull_request.url}}@{{user.login}}{{/if}} {{#closed_by_user}}@{{this}}{{/closed_by_user}} {{#if closed_by_dunno}}fixed?{{/if}} {{/unless}}{{/issues}}
subreddit_background_colors = {
"amateurradio": "rgb(216,249,226)",
"ANGEL": "rgb(227,245,252)",
"announcements": "rgb(231,237,213)",
"AskHistorians": "rgb(206,239,222)",
"Astronomy": "rgb(248,228,236)",
"bestof": "rgb(229,222,215)",
"blog": "rgb(254,248,241)",
"books": "rgb(221,214,223)",
"buffy": "rgb(247,208,237)",