Skip to content

Instantly share code, notes, and snippets.

View monokrome's full-sized avatar
😻
meow

Bailey Stoner monokrome

😻
meow
View GitHub Profile
This file has been truncated, but you can view the full file.
2391 ##linux Channel website: https://freenode.linux.community | Pastebin: https://paste.linux.community | Need an op? Join ##linux-ops | CoC? ##linux-offtopic, please.
1931 #python Don't paste, use https://paste.pound-python.org/ | http://bit.ly/psf-coc | Tutorial: http://bit.ly/MCAhYx | New programmer? http://bit.ly/23X7emF | Specify 2.x or 3.x in your question | Find your local User Group: http://goo.gl/S1Zsq | #python-fr #python.de #python-es #python.tw #python-br #python-nl #python-ir #python.it #python-ro #python-india #python-hu #python-dk #python-dev
1926 #freenode Welcome to #freenode | Feel free to message staff at any time. You can find us using /stats p (shows immediately-available staff) or /who freenode/staff/* (shows all staff) | See https://freenode.net/news/spambot-attack regarding spam | User mode +R blocks unregistered user PMs
1787 #python PSF Survey: https://bit.ly/psf-survey-2018 | Anything about Python is on-topic. Don't paste, use https://paste.pound-python.org/ | Be nice: https://j.mp
@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 / allow_docker_access.sh
Last active December 27, 2015 21:39
Allow Shipyard to access docker on port 4243.
sudo ufw allow from $(docker inspect $(docker ps | grep 'shipyard/shipyard' | grep Up | cut -d \ -f 1) | grep IPAddress | cut -f 4 -d \") to any port 4243
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@monokrome
monokrome / itunes_receipts.py
Last active December 19, 2015 17:39
Search within a mailbox for iTunes receipts, and write a JSON representation of all iTunes receipts as 'receipts.json'.
#!/usr/bin/env python
import mailbox
mailbox_root = 'your_mailbox'
mailbox_type = mailbox.Maildir
###########################################
###########################################
## Configuration section finished. ##
@monokrome
monokrome / models.coffee
Last active December 19, 2015 12:28
Polymorphic relatedModel for backbone-associations
{polymorphic} = require 'polymorphic'
class OtherModel extends Backbone.Model
class YetAnotherOtherModel extends Backbone.Model
class MyModel extends Backbone.Model
relations: [
type: Backbone.One
key: 'otherUri'
@monokrome
monokrome / nginx
Last active December 19, 2015 11:58
Makes loading and running Homebrew's nginx on OS X easier.
#!/usr/bin/env sh
fail() {
echo "Failed to authenticate as superuser."
exit
}
# Verify that we have privileges or fail
test sudo || fail
@monokrome
monokrome / example.py
Created June 20, 2013 18:49
Templates using built-in Python string formatting.
from .utils import template
x = template('example.sh', '~', options='-al')

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@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