Skip to content

Instantly share code, notes, and snippets.

View bear's full-sized avatar

Mike Taylor bear

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bear on github.
  • I am codebear (https://keybase.io/codebear) on keybase.
  • I have a public key ASDmWeaDLHWrk6kSQqjLcuSMVHh0jvidZeaRIIY2s707jwo

To claim this, I am signing this object:

@bear
bear / WSC.md
Last active July 29, 2017 21:42 — forked from prologic/WSC.md
Web Security Checklist (draft)

Web Security Checklist (draft)

Instructions

Please fork this gist and use as your own checklist as you develop/deploy your web application or api.

WARNING: This checklist makes an assumption of the level of expertise and experience of the reader and assumes significant in-depth knowledge and experience in web development.

App

server {
listen 80;
server_name bear.im;
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /tmp/letsencrypt-auto;
}
location / {
return 301 https://$server_name$request_uri;
@bear
bear / github_prs.py
Created January 14, 2016 03:57
List all of your pull requests
#!/usr/bin/env python
import os
import json
# pip install PyGithub
from github import Github
github_config = os.path.expanduser('~/.github.cfg')
@bear
bear / iptables.sh
Created December 11, 2015 20:22
iptables baseline
#!/bin/bash
iptables -F
# Default policy is drop
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
iptables -A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh
@bear
bear / notes.md
Created October 17, 2015 00:11
Google App Engine deploy via Travis-CI - info

If you see the following error in your Travis-CI GAE deploy:

ERROR: Error Response: [403] Project has not enabled the API. Please use Google Developers Console to activate the API for your project.
Details: [
  [
    {
      "@type": "type.googleapis.com/google.rpc.Help",
      "links": [
        {
@bear
bear / count_hcards.py
Created October 15, 2014 06:07
sample indie-stats cruncher
#!/usr/bin/env python
# count_hcards.sh domain workdir datajson resultjson
import os, sys
import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('domain',)
@bear
bear / withknown.conf
Last active December 21, 2017 02:01
nginx config for Known
server {
listen :80;
server_name example.net;
access_log /var/log/nginx/example-access.log;
error_log /var/log/nginx/example-error.log error;
root /srv/known;
location ~ /\.ht {
deny all;
@bear
bear / baseline.sh
Last active August 29, 2015 14:06
bash script to baseline a server
#!/bin/bash
# assumes a fairly recent Ubuntu - may work on Debian or others but needs testing
# assumes you have your .ssh/config setup to specify a user and key for the host
HOST=$1
KEY=$2
if [ "${HOST}" == "" ]; then
echo "you must provide a hostname"
@bear
bear / indieweb_listener.cfg
Last active March 7, 2016 07:14
flask app for webmentions and indieauth
{
"client_id": "https://bear.im",
"baseurl": "http://localhost:9999",
"logpath": ".",
"host": "localhost",
"port": 9999
}