Skip to content

Instantly share code, notes, and snippets.

View amonks's full-sized avatar
🐋
🐟🐠🐡

Andrew Monks amonks

🐋
🐟🐠🐡
View GitHub Profile
@amonks
amonks / 0-pftv-skip-interstitial-ads.user.js
Last active April 21, 2024 20:07
This is a browser user script to skip the annoying interstitial ad pages on Project Free TV, and a quick introduction to user scripts and jQuery in general.
// ==UserScript==
// @name Skip Interstitial Ad Pages on Project Free TV
// @namespace https://gist.github.com/amonks/b68fe6fc0c447719f2a9
// @version 1.0
// @description Skip the annoying interstitial wait-10-seconds ad page when watching pirated videos on Project Free TV
// @author Andrew Monks
// @match http://www.free-tv-video-online.info/internet/*
// @grant none
// ==/UserScript==
@amonks
amonks / hyper.lua
Created January 13, 2017 07:34
hammerspoon hyper key: capslock to escape _and_ cmd+ctrl+alt+shift
print([[
HYPER
## install
Use karabiner-elements to bind capslock to F18
install hammerspoon

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

package main
import "C"
import (
"fmt"
"log"
"os"
"github.com/gdamore/tcell/v2"
// 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.
@amonks
amonks / monad.js
Created July 19, 2016 08:37
How to work with Monads IRL // Chaining in JavaScript
/* How to work with Monads IRL // Chaining in JavaScript
* by Andrew Monks // https://monks.com/monads
*
* try it in your browser:
* https://tonicdev.com/amonks/578beb1fdb37ac12001d3826
Have you ever chained a bunch of functions together?
Math.log(Math.floor(Math.sqrt(Math.random())))
@amonks
amonks / actor—object.schema
Last active August 21, 2018 18:18
actor—object system with permissions in two graphql interfaces
##############################################################
# #
# GRAPHQL SCHEMA EXAMPLE #
# actor-object system with permissions #
# #
##############################################################
# #
# Andrew Monks #
# 05/15/2017 #
# #

ACTIVE AUTHENTICATION @ DARPA // Andrew Monks

Project description

Goals

DARPA first announced Active Authentication in 2011. The project seeks to replace password-based authentication with what I might have intuitively called a more active model: rather than requiring the user to take a specific login action (which can be discretely spoofed), a device should continually gather data based on usage patterns (typing speed, mouse movement, …) and then compare that data to the known patterns of an authorized user. As the system gains confidence that its user is authorized, it will gradually (but over a very short duration of perceived human time) remove access restrictions. If the system detects an unauthorized user, it'll shut down and call security (or follow whatever other procedure, as specified).

Timeline

@amonks
amonks / respiration.md
Last active February 20, 2018 18:22
Some thoughts on Black Star's *Respiration*, thought by Andrew Monks

Some thoughts on Black Star's Respiration

The most recent version of this paper will probably always be available on Github at this link

Intro

Black Star's classic single Respiration deals with city life, both in New York, as told my Mos Def and Talib Kweli, and in Chicago, as told by Common. Like the other classics on …Are Black Star, Respiration was produced by Hi-Tek using a sample from The Fox, by Don Randi.

Context

/**
* ## 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.