Skip to content

Instantly share code, notes, and snippets.

@m00g00
m00g00 / hn-filter.js
Created April 14, 2019 20:03
Hacker News filter out domains/keywords. Edit filter_out array.
// ==UserScript==
// @name Unnamed Script 714923
// @version 1
// @grant none
// @match https://news.ycombinator.com/*
// ==/UserScript==
var filter_out = [
'NY Times',
'nytimes.com'
@m00g00
m00g00 / hn-filter.js
Created April 14, 2019 19:42
Hacker News domain filter. Edit filter_domains array
// ==UserScript==
// @name Unnamed Script 714923
// @version 1
// @grant none
// @match https://news.ycombinator.com/*
// ==/UserScript==
var filter_domains = [
'nytimes.com'
];
@m00g00
m00g00 / hn-filter.js
Created April 14, 2019 19:39
hacker news filter domains. edit filter_domains array
// ==UserScript==
// @name Unnamed Script 714923
// @version 1
// @grant none
// @match https://news.ycombinator.com/*
// ==/UserScript==
var filter_domains = [
'nytimes.com'
];
@m00g00
m00g00 / hn-filter.js
Created April 14, 2019 19:37
hackernews filter, edit filter_domains array
// ==UserScript==
// @name Unnamed Script 714923
// @version 1
// @grant none
// @match https://news.ycombinator.com/*
// ==/UserScript==
var filter_domains = [
'github.com',
'nytimes.com'
var config = {
id: 'freenode',
server: 'chat.freenode.net',
port: 6667,
nick: 'catb0t',
alt_nicks: ['Calvin', 'Moe', 'Susie', 'Hobbes'],
user: 'catb0t',
mode: 4,
name: 'Calvin',
channels: ['#javascript', '#Node.js', '#altjs', '#zomfg'],
var http = require('http')
var client = http.createClient(80, 'dev.wellplayed.org');
var req = client.request('GET', '/api/channels/live.json?key=e45296d6343c13e75b4d2566028f5871', {
'Host': 'dev.wellplayed.org',
'User-Agent': 'Mozilla/5.0',
'Authorization': 'Digest username="wpdev", realm="dev", nonce="momFNsumBAA=e79aec4cb44b77ce1d1039a72a14ffda4621aba9", uri="/api/channels/live.json?key=e45296d6343c13e75b4d2566028f5871", algorithm=MD5, response="5b21375dc51544784f1cf2a9fe743174", qop=auth, nc=00000001, cnonce="082c875dcb2ca740"'
});
var a = new String("abcdefg[");
var b = a.replace('[','Z');
document.write("b: " + b + "<br/>"); //Produces result "b: abcdefg[", desired result "b: abcdefgZ"
b = a.replace('a','Z');
document.write("b: " + b + "<br/>"); //Produces result "b: Zbcdefg["
@m00g00
m00g00 / LICENSE.txt
Created May 27, 2011 05:56 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE