Skip to content

Instantly share code, notes, and snippets.

View monokrome's full-sized avatar
😻
meow

Bailey Stoner monokrome

😻
meow
View GitHub Profile
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=()
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
@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
#!/usr/bin/env node
const DEFAULT_PAGINATION_SIZE = 9
const ELLIPSIS = '...'
function getPagination(currentPage, numberOfPages, maxSize) {
if (numberOfPages === 1) {
return [1]

Keybase proof

I hereby claim:

  • I am monokrome on github.
  • I am monokrome (https://keybase.io/monokrome) on keybase.
  • I have a public key whose fingerprint is 914A AEF0 1B34 9BD3 1BBB 7DF7 D434 E971 4038 FCCB

To claim this, I am signing this object:

task_name: dependencies in order
things
to
do
after
other_task: dependencies different order
things
to
do