Skip to content

Instantly share code, notes, and snippets.

Avatar
🐋
🐟🐠🐡

Andrew Monks amonks

🐋
🐟🐠🐡
View GitHub Profile
View handle_plex_webhook_in_rocket_chat.js
// Add something here to handle a new type of plex event.
const event_handlers = {
"media.resume": silent,
"media.pause": silent,
"media.scrobble": silent,
"media.play": verb_handler("started playing"),
"media.stop": silent,
};
// silent handles a plex event by posting no message to rocket chat.
View flatten.js
/**
* ## flatten
*
* Flatten an array of integers
*
* This is mighty readable, but it won't perform well in a tight
* loop or with a huge structure.
*
* If that's a problem, we could switch to an iterative process,
* and/or build the output array via mutation. See below.
@amonks
amonks / actor—object.schema
Last active Aug 21, 2018
actor—object system with permissions in two graphql interfaces
View actor—object.schema
##############################################################
# #
# GRAPHQL SCHEMA EXAMPLE #
# actor-object system with permissions #
# #
##############################################################
# #
# Andrew Monks #
# 05/15/2017 #
# #
View installing-arch-on-yoga-11e-chromebook.md

Install arch on a Lenovo Yoga 11e Chromebook

The Thinkpad Yoga 11e isn't the most popular chromebook, but you can readily pick one up for less than 200$, and it's physically built like a tank. You could throw it at a man, pick it back up, and go on typing.

This chromebook is a member of the categories "braswell" and "ULTIMA".

I'll describe the process I followed to get Arch running on it. The firmware steps should be the same if you'd like to install Gallium, an excellent chromebook-optimized distro forked from Xubuntu.

Firmware

View how-your-shell-picks-which-program-to-run.md

how your shell picks which program to run

I often use a program called git in my terminal.

When I type git, my shell runs the program located at /usr/local/bin/git.

I found that out just now by running the command which git:

[I] ⋊> ~ which git
View gist:fb39e4f775394e6705bd6469555a1974
From s.suresh@adityamusicindia.com Sun Jan 22 15:08:05 2017
Date: Mon, 23 Jan 2017 00:07:43 +0300
From: information <s.suresh@adityamusicindia.com>
Subject: {SPAM 10.1} i would lose business and contracts,i'm not even sure if my contract with my employer has a morality clause,"she told CNNMoney on Friday"it could be very damaging"
Hello Mr i am your nightmare
We are attacking your website now and we have taking it down for around
4 hours now.
View gist:1a88db21b7f8f6ad2bd7fe9a072c1f35
From hana@melodylogistics.com Tue Jan 24 14:35:31 2017
Date: Tue, 24 Jan 2017 23:34:34 +0300
From: Next Msg To Your Wife! i Swear! or You Pay! <hana@melodylogistics.com>
Subject: {SPAM 08.6} is Your Husband Cheating?
i now have your information.i have also used your user profile to find your
Facebook page,Using this i can now message all of your friends and family
members,
If you would like to prevent me from sharing this dirt info with all of your
View static-server.js
#! /usr/bin/env node
// static-server.js
const express = require('express')
const server = express()
// serve whatever directory you run the command from
const dir = process.cwd()
server.use(express.static(dir))
View functional-javascript.js
// ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
// ⚠️ This isn't very written yet! ⚠️
// ⚠️ I'll post on monks.co when ⚠️
// ⚠️ it's more done. ⚠️
// ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
// check out this gist to see a changelog:
// https://gist.github.com/amonks/b06302fc5489d28b243e627fc2a910b4/
/* global R */
You can’t perform that action at this time.