Skip to content

Instantly share code, notes, and snippets.

Dan Fitch dgfitch

Block or report user

Report or block dgfitch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dgfitch / nih_toolbox.php
Created Aug 29, 2019
Simple web service endpoint for NIH Toolbox in PHP
View nih_toolbox.php
$target_dir = "uploads/";
ini_set('display_errors', 'On');
header('Content-Length: 0');
header('Connection: keep-alive');
dgfitch /
Created Apr 26, 2019
Using libvlc from python to display video via OpenGL (cheating slightly with pyglet)
from __future__ import absolute_import, division, print_function
import time
import os
import sys
import threading
import logging
import ctypes
dgfitch /
Last active Apr 3, 2019
Draw your feels

Preliminary experimenting with d3, "draw your feelings"

dgfitch / gulp.txt
Created Mar 28, 2017
Gulp error trying to watch
View gulp.txt
dan@batman:~/git/$ gulp
[19:52:44] Warning: gulp version mismatch:
[19:52:44] Global gulp is 3.9.1
[19:52:44] Local gulp is 3.8.11
[19:52:44] Using gulpfile ~/git/
[19:52:44] Starting 'client'...
[19:52:44] 'client' errored after 22 ms
[19:52:44] TypeError: gulp.src(...).pipe(...).pipe is not a function
at Gulp.<anonymous> (/home/dan/git/
at module.exports (/home/dan/git/
dgfitch / FogbugzToPhabricator.fs
Created Jun 1, 2015
Automated Fogbugz export to Phabricator import in F#
View FogbugzToPhabricator.fs
open FSharp.Data
open FSharp.Data.JsonExtensions
open System.Xml
open System.Net
open System.Web
open System.IO
open System.Text
dgfitch /
Created Apr 28, 2015
git-checkpoint: Script to allow non-git-experts to use git with a single command, "git checkpoint"
# git-checkpoint
# ==============
# Minimal version tracking with git using a single command.
# Intended to ease people new to git into easy versioning
# in a single server repository location, but they can also
# expand on their knowledge and use other git commands as
# they learn.
dgfitch / level1_qc.bash
Last active May 23, 2016
Level 1 QC script converted to bash with some functions and features
View level1_qc.bash
# Script that combines all run images into one
# html file for quality assurance.
# Assess plots for unusually bad motion or extreme
# amounts of censoring
# Examples of functions and redirecting output
dgfitch /
Created Jan 9, 2015
Example of drawing left and right eye data in gcCursor psychopy example
while run_trial is True:
# Additional debug dumping crap
if data:
dgfitch / gist:4636234
Created Jan 25, 2013
VB Area API routes
View gist:4636234
Public Overrides Sub RegisterArea(ByVal context As System.Web.Mvc.AreaRegistrationContext)
'' general api routes
New With {.version = "1"}
dgfitch / http_stopwatch.fs
Created Oct 4, 2011
Simple HTTP statistics timer in F#
View http_stopwatch.fs
open System
open System.IO
open System.Net
open System.Diagnostics
let track (url:string) (log:string) =
while true do
let stopwatch = new Stopwatch()
You can’t perform that action at this time.