Skip to content

Instantly share code, notes, and snippets.

@kwharrigan
kwharrigan / dmtcp.py
Created April 4, 2014 01:50
Starcluster plugint to install dmtcp.
from starcluster.clustersetup import ClusterSetup
from starcluster.logger import log
class DMTCP(ClusterSetup):
def __init__(self, url, archive_file, install_hbict, hbict_url):
self.dmtcp_url = url
self.archive_file = archive_file
self.install_hbict = install_hbict
self.hbict_url = hbict_url
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

SVG fragment builds for reveal.js

Basic use case

  • make an SVG (maybe in inkscape)
    • save it someplace reveal.js can find it (maybe next to your presentation)
    • figure out how to identify them (maybe use named layers)
  • in reveal.js/index.html
    • add reveal-svg-fragment.js as a dependency
    • in a <section> of reveal.js markup
  • add data-svg-fragment="" to something, e.g.
git log -n 3 --pretty=format:'{%n "parent": "%P", %n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' | sed -e '1i\
[' -e '$s/,/]/g' > tmp.json
@kwharrigan
kwharrigan / tree.js
Created July 22, 2014 06:11
Basics for visualizing GIT history using d3 from some json. Makes a tooltip out of the details.
var commits = [
{
"parent": "e98bb31",
"commit": "fb3a06f49b06fd7358c46c153b35ff6a29cd33cd",
"author": "Kyle Harrigan <kwharrigan@gmail.com>",
"date": "Mon Mar 5 20:12:12 2012 -0500",
"message": "Fortran-examples-and-automake-scripts"
},
{
"parent": "3475367",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kwharrigan
kwharrigan / adduser.sh
Created October 16, 2009 14:59
openssl utility script for adding users
#!/bin/bash
EXPECTED_ARGS=2
if [ $# -ne $EXPECTED_ARGS ]
then
echo $'Usage: \n\tadduser <name> <CA>'
echo $'\tWhere <name>.csr, <name>.pem, and <name>.key exist\n'
exit 0
else
@kwharrigan
kwharrigan / C3D.i
Created February 15, 2010 15:17
Swig script for C3D and related makefile
%module C3D
%{
/* Includes the header in the wrapper code */
#include "C3D.h"
#include "vl/vld.h"
%}
/* Parse the header file to generate wrappers */
@kwharrigan
kwharrigan / requirementtable.xsl
Created May 28, 2010 19:08
Topcased Requirements Table XSLT
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*******************************************************************************
* Copyright (c) 2009 RealTime-at-Work.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
@kwharrigan
kwharrigan / process_manifest.sh
Created June 1, 2010 21:38
Process Innosetup Manifest File
#!/bin/sh
EXPECTED_ARGS=1
B2F='gsub(/\\/, "/")'
OUT='("basename \"" $2 "\"") | getline filename ; printf("%s %s %s %s\n", $1, filename, $3, $5)'
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: process_manifest.sh <filename>"
exit 1