Skip to content

Instantly share code, notes, and snippets.

View harrislapiroff's full-sized avatar
😍
󠁼

Harris Bard Lapiroff harrislapiroff

😍
󠁼
View GitHub Profile
@harrislapiroff
harrislapiroff / README.md
Last active June 10, 2019 21:36
Wagtail Forms with extra per field data

A method for adding further customizability to Wagtail Forms fields. Could be used for:

  • Adding images to survey questions
  • Offering different styling options for form inputs (e.g., horizontal vs vertical radio buttons)
  • Etc.
@harrislapiroff
harrislapiroff / ydw_lottery.py
Last active June 24, 2019 03:35
YDW Lottery
import csv
import random
from statistics import median, mean
INPUT_FILE = 'prepareddata.csv'
OUTPUT_ATTENDEES_FILE = 'output/attendees.csv'
OUTPUT_WAITLIST_FILE = 'output/waitlist.csv'
# Lottery numbers will be multiplied by these boost amounts when appropriate
@harrislapiroff
harrislapiroff / report.txt
Created April 18, 2019 16:08
Text of Mueller Report (Generated by Tesseract OCR)
This file has been truncated, but you can view the full file.
U.S. Department of Justice
Attorney Work Produet // May-Contain Material Protected Under Fed R-Crim-P-6fe)
Report On The Investigation Into
Russian Interference In The
2016 Presidential Election
Volume I of II
#!/usr/bin/env node
let path = require('path')
let program = require('commander')
// Import a "promisified" version of `exec` so we can use it procedurally
// with `await`
let { promisify } = require('util')
let exec = promisify(require('child_process').exec)
[core]
excludesfile = /Users/harris/.gitignore_global
editor = nano
[alias]
s = status -sb # Concise status display
b = branch
co = checkout
cob = checkout -b
please = push --force-with-lease
coremote = "!git fetch && git checkout"
@harrislapiroff
harrislapiroff / csp.py
Created July 6, 2018 18:02
Django REST Framework CSP Compatibility
"CSP compatible variations on DRF classes"
from functools import update_wrapper
from csp.decorators import csp_update
from django.utils.decorators import method_decorator
from rest_framework.routers import DefaultRouter, APIRootView
from django.utils.decorators import classonlymethod
from django.views.decorators.csrf import csrf_exempt
from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.migrations.recorder import MigrationRecorder
OUR_APPS = [
'blog',
'home',
# etc
]

Keybase proof

I hereby claim:

  • I am harrislapiroff on github.
  • I am harrislapiroff (https://keybase.io/harrislapiroff) on keybase.
  • I have a public key ASD8bRwZDKB6kCfzKUj2zN18an1w-0WKGuW3Pbg6GuIBfgo

To claim this, I am signing this object:

@harrislapiroff
harrislapiroff / GitHub_Issue_Popovers.js
Last active November 28, 2016 16:23
GitHub Issue Popovers GreaseMonkey Script
// ==UserScript==
// @name GitHub Issue Popovers
// @namespace chromamine_github_enhancer
// @include http://github.com/*
// @include http://*.github.com/*
// @include https://github.com/*
// @include https://*.github.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/tether-drop/1.4.2/js/drop.min.js
// @grant GM_addStyle
@harrislapiroff
harrislapiroff / User Scripts
Last active July 17, 2020 00:43
A collection of userscripts Harris Lapiroff personally uses. Recommended to install using Tampermonkey: https://www.tampermonkey.net/
We couldn’t find that file to show.