Skip to content

Instantly share code, notes, and snippets.

@PyroLagus
PyroLagus / mailmon
Created December 22, 2019 19:19 — forked from eigengrau/mailmon
E-mail notifications using IMAP IDLE (no polling)
#!/bin/zsh
#
# Trigger a command when new mail arrives on the server, using IMAP IDLE. Cf.
# <http://dwm.suckless.org/scripts/email_notifier_script>.
#
# Note that, theoretically, fetchmail can take a comma-separated list of
# multiple folders, but IDLE will only poll the first one, so if you need to
# monitor multiple mailboxes, you need to run multiple monitor instances.
#
# Passwords are read from the password store keyring by default.
@PyroLagus
PyroLagus / playground.rs
Created April 19, 2019 16:02 — forked from anonymous/playground.rs
Shared via Rust Playground
macro_rules! enum_with_str_representation {
(enum $enum_name:ident {
$($variant:ident => $nice_name:expr,)+
}) => {
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
enum $enum_name {
$($variant),+
}
impl ::std::fmt::Display for $enum_name {
/*****************
* bossFight.js *
*****************
*
* NO FARTHER, DR. EVAL!!!!
* YOU WILL NOT GET OUT OF HERE ALIVE!!!!
* IT'S TIME YOU SEE MY TRUE FORM!!!!
* FACE MY ROBOT WRATH!!!!!
*/
/**********************
* superDrEvalBros.js *
**********************
*
* You're still here?! Well, Dr. Eval, let's see
* how well you can operate with one less dimension.
*
* Give up now. Unless you have a magic mushroom
* up your sleeve, it's all over.
*/
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
/**********************
* fordingTheRiver.js *
**********************
*
* And there's the river. Fortunately, I was prepared for this.
* See the raft on the other side?
*
* Everything is going according to plan.
*/
/*******************
* intoTheWoods.js *
*******************
*
* Ah, you're out of the woods now. Or into the woods, as the
* case may be.
*
* So take a deep breath, relax, and remember what you're here
* for in the first place.
*