Skip to content

Instantly share code, notes, and snippets.

@mattsnider
mattsnider / bootstrap.sh
Last active February 1, 2023 22:02
This is a shell script I use to bootstrap new dev machines (OSX) and servers (Ubuntu). It will ensure everything I need for python, node.js, and git is installed. After running bootstrap, I just need to clone my project and run the initialization script in my project to complete the setup.
#!/bin/bash
# expects python is installed with OS distribution
# single line command for execution
# wget -O - <RAW_URL> | bash
# determine environment
if hash apt-get 2>/dev/null; then
echo "Bootstrapping UBUNTU"
UBUNTU=true
@mattsnider
mattsnider / mirror_files.py
Created June 25, 2013 20:40
This tool can be used to mirror files from a source directory to a destination directory. You can specify one file using `destination` and `source` or define many files using `source_map` (a csv with source,destination file per line).
"""
This tool can be used to mirror files from a source directory to a destination
directory. You can specify one file using `destination` and `source` or define
many files using `source_map` (a csv with source,destination file per line).
"""
import argparse
import os
import time
// Modified from http://mattsnider.com/cross-browser-and-legacy-supported-requestframeanimation/
// LICENSE: MIT: http://mattsnider.com/projects/license/
(function(w) {
"use strict";
// most browsers have an implementation
w.requestAnimationFrame = w.requestAnimationFrame ||
w.mozRequestAnimationFrame || w.webkitRequestAnimationFrame ||
w.msRequestAnimationFrame;
w.cancelAnimationFrame = w.cancelAnimationFrame ||
@mattsnider
mattsnider / Arecibo Install.md
Last active December 21, 2015 09:39
Steps for installing Arecibo intern project
@mattsnider
mattsnider / iOSAndjQueryMobileBase.html
Created August 23, 2013 01:27
A Django template extending the Django-HTML5-Boilerplate package using jQueryMobile to create a base template for a mobile HTML5 application. https://github.com/mattsnider/django-html5-boilerplate http://jquerymobile.com/
{% extends 'dh5bp/base_script_in_head.html' %}
{% load staticfiles %}
{% load url from future %}
{% block title %}{APP_TITLE}{% endblock %}
{% block head %}
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-startup-image" href="{% static '{STATIC_IMAGE_PATH}/startup-image.png' %}">