Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name GitHub Pull: All open review requests button
// @namespace Violentmonkey Scripts
// @match https://github.com/pulls*
// @grant MIT
// @version 1.0
// @author Reece Hart <reecehart@gmail.com>
// @description Add button to show previously reviewed pull requests that are still open
// @require https://code.jquery.com/jquery-3.6.1.slim.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@reece
reece / index.html
Created August 1, 2021 03:45
video screenshot
<div class="wrap">
<video id="video" width="320" controls="true">
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4">
<!-- FireFox 3.5 -->
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4">
<!-- WebKit -->
Your browser does not support HTML5 video tag. Please download FireFox 3.5 or higher.
</video>
<br/>
<button id="cit" onclick="shoot()" class="button">Capture</button>
@reece
reece / freshbooks-oauth2-example.py
Created August 30, 2019 18:58
FreshBooks OAuth2 authentication example
# FreshBooks OAuth2 authentication example
# Based on examples from
# https://requests-oauthlib.readthedocs.io/en/latest/examples/examples.html
# Credentials you get from registering a new application
# at https://my.freshbooks.com/#/developer
client_id = '<the id you get from FreshBooks>'
client_secret = '<the secret you get from FreshBooks>'
# OAuth endpoints from FreshBooks API documentation
@reece
reece / pjs-literal-issue.py
Created December 29, 2017 01:33
pjs-literal-issue.py
#!/usr/bin/python
# schema from README.md
schema = """
{
"title": "Example Schema",
"type": "object",
"properties": {
"firstName": {
"type": "string"
swagger: "2.0"
info:
title: "https://github.com/swagger-api/swagger-codegen/issues/5460"
basePath: "/0"
schemes:
- "https"
- "http"
paths:
/test/:
#!/usr/bin/env python
import os
os.environ["SETUPTOOLS_SCM_DEBUG"] = "1"
import pkg_resources
import setuptools_scm
print("setuptools_scm = " + str(pkg_resources.get_distribution("setuptools_scm")))
print(setuptools_scm.get_version())
@reece
reece / so-id-searching
Created March 12, 2016 18:58
Demonstrate unexpected behavior of effect filters with searchVariantAnnotations
#!/usr/bin/env python2
# This script returns for me:
# ga4gh version: 0.1.dev616+ncbb0131b36d2
# AssertionError: reversing filter order changes number of results (697!=56)
# using server test data as described here:
# https://github.com/ga4gh/server/pull/930
import ga4gh.client
@reece
reece / test.py
Last active September 8, 2015 18:33
test
import copy
global_conf_defaults = {
'order': 'FL',
}
global_conf = copy.deepcopy(global_conf_defaults)
class Name(object):
"""
@reece
reece / Alternative variant annotation proposal
Last active August 29, 2015 14:21
variant annotation proposal
{
"loci": [
{
"ac": "NC_000003.11",
"ref": "T",
"alt": "C",
"HGVSg": "NC_000004.14:g.57232242T>C",
"annotations": {
"aliases": {
"dbSNP": [
@reece
reece / GA4GH_prototype_annotations2
Last active August 29, 2015 14:20
GA4GH_prototype_annotations2.docx, sent by Sarah Hunt to ga4gh-dwg-annotation@googlegroups.com on May 7
'variantannotations' => [
{
'created' => '1430919899622',
'id' => 'subs',
'transcriptEffects' => [
{
'featureId' => 'ENST00000390914',
'IMPACT' => 'MODIFIER',
'alternateSequence' => 'C',
'effects' => [