Skip to content

Instantly share code, notes, and snippets.

View crmackay's full-sized avatar

Chris MacKay crmackay

View GitHub Profile
<!DOCTYPE html>
<head><meta charset="UTF-8"></head>
<body>
<form id="form1">
<select name="question1">
<option value="value1">Value 1</option>
<option value="value2" selected>Value 2</option>
<option value="value3">Value 3</option>
</select>
@crmackay
crmackay / report.lua
Last active January 24, 2017 21:12
incomplete LaTeX report writer for pandoc
-- incomplete markdown to latex handout custom writer...
-- to create a report, run
-- $ pandoc -t ~/bin/report.lua | pdflatex
-- still a work in progress... many of the functions are still in the HTML form from the example Pandoc spits out, and also
-- example markdown:
-- # this is a title
--
-- ![this is a caption](path.jpg){#fig:one width=4in caption=side}
@crmackay
crmackay / build.py
Created June 24, 2016 00:30
latex build script (work in progress)
"""
markdown --> pandoc --> latex --> pdf builder script
features:
- checkes for changes in the current working directory
- stores change data between runs in this file itself (at the bottom)
- will only rebuild and rerun those parts that need to be rebuilt
- will run `pdflatex` only as many times as necessary
- for every `.md` file in the cwd it will run pandoc and produce a so-named `.tex` latex file
- if any `.tex` file changes then pdflatex is run
@crmackay
crmackay / illumina-bcl-description.md
Last active May 7, 2021 16:27
description of illumina's bcl file format
@crmackay
crmackay / index.html
Created December 13, 2015 17:23 — forked from anonymous/index.html
Video.js Example Embed // source http://jsbin.com/gupoha
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Video.js Example Embed</title>
<link href="http://vjs.zencdn.net/5.3.0/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.3.0/video.js"></script>
</head>
@crmackay
crmackay / htmlbook-test.html
Created August 17, 2015 18:59
test of htmlbook for an article
[section: small, fun, #1]
# this is a section
<section class="small fun" id="1">
<h1>this is a seciont</h1>
<head>
<meta name="">
</head>
@crmackay
crmackay / gist:da52b5d1b36bcf764eb1
Created June 25, 2015 04:20
prefill new issue form
https://github.com/crmackay/cosaco/issues/new?title=foo&body=bar&labels=enhancement
//I'm learning about bitwise flags and bitwise math (|, ^=, |=, etc) in golang...
//http://play.golang.org/p/QTJZJaOjZc
package main
import "fmt"
const (
one = 1 << iota // 1 = 0000 0001
two // 2 = 0000 0010
@crmackay
crmackay / lsf_test.py
Last active August 29, 2015 14:16
lsf in python
#!/usr/bin/env python
import os
#
#BSUB -W 00:10
#BSUB -q regular
#BSUB -n 12
#BSUB -J myjob.py
#BSUB -P project_code
#BSUB -oo output
@crmackay
crmackay / file_path.py
Last active August 29, 2015 14:11
finding path of running file
import os
#path to direcory containing file
path = os.path.dirname(os.path.abspath(__file__))
# path to containing directory
path_above = os.path.split(path)[0]