Skip to content

Instantly share code, notes, and snippets.

View monokrome's full-sized avatar
😻
meow

Bailey Stoner monokrome

😻
meow
View GitHub Profile
@monokrome
monokrome / .screenrc
Created June 23, 2012 22:19
A good .screenrc file, thanks to @kroogs
# Get rid of the startup message
startup_message off
# Stop flashing when I get an alert
vbell off
# Automatically detach if a disconnect occurs
autodetach on
# Think of it as xterm and give me scrolling
@monokrome
monokrome / commands
Last active December 17, 2018 22:33
Some of my weechat settings
/key bind meta-ctrl-I /go
/key unbind ctrl-W
/key bind ctrl-Wl /window right
/key bind ctrl-Wh /window left
/key bind ctrl-Wj /window down
/key bind ctrl-Wk /window up
/key bind ctrl-Wmeta2-C /window right
Contact: security@metanic.org
Encryption: https://keybase.io/monokrome
Acknowledgements: https://github.com/metanic/metanic/tree/master/CONTRIBUTORS.md
Permission: none
Policy: asfasfhttps://github.com/metanic/metanic/tree/master/SECURITY.md
(function __FORGOTTHENAME__(a, b) {
return () => {
a(...args) // Create a side effect
return b(...args) // Return result of calling b
}
})
import typing
from django.db.models import Manager
from django.db.models.query import QuerySet
class TopicManager(Manager):
def having_names(self, names: str, *, create_missing: bool = False, **create_kwargs: typing.Dict[str, typing.Any]) -> QuerySet:
if not len(names):
return self.none()

Keybase proof

I hereby claim:

  • I am monokrome on github.
  • I am monokrome (https://keybase.io/monokrome) on keybase.
  • I have a public key ASAf75zfHTn9s38idtG2TbNyEW5STSEBdlbZhAp1UYJw0wo To claim this, I am signing this object:
{
  "body": {
    "key": {
#!/usr/bin/env bash
# Rename this to `$vpn_state` to be more semantically useful. `$script_type` is
# a really weird name.
vpn_state=$script_type
case $vpn_state in
up)
nameservers=()
search=()
@monokrome
monokrome / interfaces.coffee
Last active January 9, 2018 15:00
Interfaces in CoffeeScript
class Host
constructor: ->
interfaces = @constructor.interfaces
if interfaces?
for interface in interfaces
_.extend @, interfaces
@implements: (host, interface) ->
# This effectively makes host optional
import React from 'react'
import styled from 'styled-components'
function flex(name, defaultValue) {
return (props) => {
let value = props[name]
if (!value && typeof defaultValue === 'undefined') return ''
if (!value) value = defaultValue
return `flex-${name}: ${value};`
}
@monokrome
monokrome / firefox.md
Created October 31, 2017 06:09
Configuring Firefox for security and privacy (as of Oct. 2017)

Configuring/Hardening Firefox for Security and Privacy

Source for some of these

  1. about:config
  • dom.event.clipboardevents.enabled => false
  • clipboard.plainTextOnly => true
  • referer spoofSource => true
  • media.peerconnection