Skip to content

Instantly share code, notes, and snippets.

View stuarth's full-sized avatar
🍑

Stuart Hinson stuarth

🍑
View GitHub Profile
@stuarth
stuarth / command_records.rs
Created July 21, 2018 21:55
command_records.rs
pub fn command<P: AsRef<Path>, P1: AsRef<Path>>(
matches: &ArgMatches,
repo: &Repository,
mut config: Configuration,
working_directory: P,
config_path: P1,
) -> i32 {
if !matches.is_present("no-author") && config.author.is_none() {
if let Some(author) =
cfg::Author::from_gitconfig(working_directory.as_ref().join(".git").join("config"))
@stuarth
stuarth / custom.el
Created June 21, 2017 14:44
stu emacs conf
(setq mac-command-modifier 'meta)
(scroll-bar-mode -1)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
(global-set-key (kbd "C-x b") 'ido-switch-buffer)
(require 'ido)
(ido-mode t)
todolist git:(master) gradle clean installDist && \
./todolist/build/install/todolist/bin/todolist
Starting a Gradle Daemon (subsequent builds will be faster)
:todolist:clean UP-TO-DATE
:todolist:compileJava
Download https://repo1.maven.org/maven2/com/googlecode/lanterna/lanterna/3.0.0-rc1/lanterna-3.0.0-rc1.pom
Download https://repo1.maven.org/maven2/com/googlecode/lanterna/lanterna/3.0.0-rc1/lanterna-3.0.0-rc1.jar
/Users/stuart/dev/pumpkindb-java/examples/todolist/src/main/java/org/pumpkindb/examples/todolist/Main.java:20: error: package io.netty.buffer does not exist
import io.netty.buffer.ByteBuf;
^
@stuarth
stuarth / timestamp.rs
Created April 3, 2017 20:45
timestamp.rs epoch issue
// Copyright (c) 2017, All Contributors (see CONTRIBUTORS file)
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use hlc;
use std::sync::Mutex;
use memmap::{MmapViewSync, Mmap, Protection};
@stuarth
stuarth / mandelbrot.clj
Created September 29, 2015 13:43
Mandelbrot demo from Timothy Baldridge's Strange Loop talk
(ns mandelbrot
(:require [pixie.ffi-infer :refer :all]
[pixie.ffi :as ffi]
[pixie.time :refer [time]]))
(with-config {:library "SDL2"
:cxx-flags ["`sdl2-config --cflags`"]
:includes ["SDL.h"]}
(defcfn SDL_Init)