Skip to content

Instantly share code, notes, and snippets.

View mythmon's full-sized avatar

Michael Cooper mythmon

View GitHub Profile
def count_words(story):
return len(list(filter(None, re.split(r"[^\w']", story))))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
import re
req_path = 'requirements/default.txt'
requirements = []
acc = ''
with open(req_path) as f:
for line in f:
$ curl -v 'https://vid.ly/9w8q7n?content=video' -H 'Host: vid.ly' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-us,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Referer: https://bugzilla.mozilla.org/show_bug.cgi?id=1053103' -H 'Connection: keep-alive'
* Hostname was NOT found in DNS cache
* Trying 23.21.174.14...
* Connected to vid.ly (23.21.174.14) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
atom-color-highlight/
atom-jinja2/
atom-jshint/
atom-soda-dark-ui/
atom-solo-dark-ui/
autocomplete-plus/
auto-detect-indentation/
base16-solarized-dark-syntax/
color-picker/
editorconfig/
var output = document.querySelector('#-debug-output');
if (!output) {
output = document.createElement('div');
output.style.position = 'absolute';
output.style.left = '30vw';
output.style.bottom = 0;
document.body.appendChild(output);
output.setAttribute('id', '-debug-output');
}
@mythmon
mythmon / index.html
Last active August 29, 2015 14:04
Comic Knife
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
canvas {
margin: 20px;
border: 1px dotted black;
padding: 1px;
}
@mythmon
mythmon / BitSquat.hs
Created July 17, 2014 20:48
Haskell to generate bitsquat domains.
{-# LANGUAGE TemplateHaskell #-}
module BitSquat where
import Data.Char
import Data.Bits
import Test.QuickCheck
flipBit :: Char -> Int -> Char
flipBit c n = chr $ xor (ord c) (2 ^ n)
@mythmon
mythmon / README.md
Last active August 29, 2015 14:03 — forked from willkg/README.md
Test of using input.mozilla.org and d3 and bl.ocks.org

This gist goes through the motions to see if I can get a basic block working with gists and all that.

@mythmon
mythmon / .venv
Created June 11, 2014 00:45
My venver .venv
#!/bin/bash
DIR=$(dirname $0)
v_activate() {
_OLD_PS1="$PS1"
export PS1="(venver)$PS1"
_OLD_PATH="$PATH"
export PATH="node_modules/.bin:$PATH"
r() {
npm start
}