Skip to content

Instantly share code, notes, and snippets.

View maxpowa's full-sized avatar
💻
DATABASE DATABASE JUST LIVING IN THE DATABASE WOW WOW

Max Gurela maxpowa

💻
DATABASE DATABASE JUST LIVING IN THE DATABASE WOW WOW
  • ServiceMax
  • Bay Area, California
View GitHub Profile
@maxpowa
maxpowa / hndarkmode.txt
Created June 15, 2023 16:18
Dark mode for the orange site
# HN Dark Mode
news.ycombinator.com##html:style(filter:invert(100%) hue-rotate(180deg))
news.ycombinator.com##body:style(background: white)
news.ycombinator.com##div.toptext:style(color: #111)
news.ycombinator.com##table#hnmain td:style(background-color: white !important)

Fun regenerator-runtime facts

So lets start with something that works as expected.

const foo = async () => {
  throw new Error();
};

const bar = async () => {
@maxpowa
maxpowa / ghrecentrepos.user.js
Last active May 22, 2020 17:03
recent repos on sidebar
// ==UserScript==
// @name Github Chronological Repo List
// @namespace https://gist.github.com/maxpowa/d3eb439b990fbee8cff2ae45d726c834
// @description Bring back chronological repo list on the github home page
// @include https://github.com/
// @version 0.0.2
// @require https://openuserjs.org/src/libs/sizzle/GM_config.js
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
@maxpowa
maxpowa / trash.md
Last active February 14, 2018 22:38
#WAMM Copypastas

<Yui> gaimu hetada yo ne


** To be fair, you have to have a very high IQ to understand Botania. The humour is extremely subtle, and without a solid grasp of anime most of the references will go over a typical viewer’s head. There’s also Vazkii’s nihilistic outlook, which is deftly woven into his characterisation- his personal philosophy draws heavily from Sword Art Online literature, for instance. The fans understand this stuff; they have the intellectual capacity to truly appreciate the depths of these memes, to realise that they’re not just funny- they say something deep about LIFE. As a consequence people who dislike Botania truly ARE idiots- of course they wouldn’t appreciate, for instance, the humour in the Flügel Tiara’s manual entry “Forty thousand books from another world”, which itself is a cryptic reference to that one anime you should all have watched. I’m smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion as

lastCusses = {}
@rule('some-cuss-regex')
def my_module_func(bot, trigger):
if not lastCusses[trigger.nick]:
lastCusses[trigger.nick] = []
lastCusses[trigger.nick].append(trigger.time)
if len(lastCusses[trigger.nick]) >= 3:
require "../flag.cr"
class OppositeFlag < Blerp::CommandFlag
@key = "-O"
@description = "OPPOSITE DAY"
def preprocess(parser, data)
data[self.name] = "true"
end
end
require "option_parser"
module Blerp
abstract class CommandFlag
@@flags = { } of Symbol => CommandFlag
def self.flags
@@flags
require "../flag.cr"
class ExecuteFlag < Blerp::CommandFlag
def name
:execute
end
def key
"-e"
@maxpowa
maxpowa / rss.py
Created January 25, 2016 18:35
Port credit to rinzes, I just removed the tinyurl part
# coding=utf8
from __future__ import unicode_literals
from datetime import datetime
import time
import re
import socket
import feedparser
# coding=utf-8
"""
repeat_msg.py - Example interval module
Licensed under WTFPL (https://en.wikipedia.org/wiki/WTFPL)
"""
from sopel.module import interval
@interval(60) # Every 60 seconds
def do_the_thing(bot):