Skip to content

Instantly share code, notes, and snippets.

View mattd's full-sized avatar

Matt Dawson mattd

  • WillowTree Apps
  • Charlottesville, VA
View GitHub Profile
@mattd
mattd / open_dated_note
Created May 13, 2024 19:05
open_dated_note
#!/usr/bin/env python3
import glob
import os
import shutil
import subprocess
import time
today_frags = time.strftime("%Y-%m-%d").split("-")
import React from 'react';
const getDisplayName = (Component) => {
return Component.displayName || Component.name || 'Component'
};
export const makeController = (willMount, willUnmount) => {
return (Component) => {
const noop = () => {};
class Controller extends React.Component {
import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { List, ListItem, makeSelectable } from 'material-ui/List';
import * as routerActionCreators from '../actions/creators/router';
import * as uiActionCreators from '../actions/creators/ui';
const SelectableList = makeSelectable(List);
@mattd
mattd / 0_reuse_code.js
Created February 9, 2016 21:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mattd
mattd / face-time-party-snoozer.sh
Last active August 9, 2023 20:08
face-time-party-snoozer.sh
#!/bin/bash
sayings=(
"Okay"
"I understand"
"Sure, why not"
"Thanks for coming"
"Sounds good"
)
;;;; Emacs configuration for Matt Dawson
;;;; Inspiration taken from many places, but especially Ron DuPlain's config.
;;;; GNU Emacs 24
;;; Basics
;; Define load paths.
(setq load-path (cons "~/.emacs.d" load-path))
(add-to-list 'load-path "~/.emacs.d/slime")
@mattd
mattd / gist:61f3ec0ce9ecd1aa1ec3
Created June 1, 2015 16:56
Github Build Upload Script
#!/bin/bash
PROJECT_NAME=something
REPO=someone/$PROJECT_NAME
API_BASE=https://api.github.com/repos/$REPO
UPLOAD_BASE=https://uploads.github.com/repos/$REPO
BUILD_ID=v`less bower.json | jq -r '.version'`-$BUILD_API
static char get_formatted_countdown() {
int seconds = s_countdown_seconds % 60;
int minutes = (s_countdown_seconds / 60) % 60;
char str[6];
return sprintf(str, "%d:%d", minutes, seconds);
}
var obj = {
blake: 20,
andrew: 10,
matt: 45
};
var annotated = _.map(obj, function (value, key) {
return {key: key, value: value};
});
define([
'marionette',
'marionette.formview'
], function (Marionette) {
'use strict';
Marionette.Renderer.render = function (template, data) {
return template(data);
};