Skip to content

Instantly share code, notes, and snippets.

View rnorth's full-sized avatar

Richard North rnorth

View GitHub Profile

Deckset Theme Customization Beta

Download Beta Build (builds expire after 28 days)

Here is an example snippet of the theme configuration commands (place these at the top of your Markdown file):

theme: Work
text: Gill Sans, #F5E5C0, text-scale(0.75), line-height(1.4)
header: Gill Sans UltraBold, text-scale(1.2), line-height(0.9)
@lornajane
lornajane / mac.md
Last active May 13, 2024 05:43
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
public class InterceptorDataSource implements InvocationHandler {
private final DataSource delegate;
private InterceptorDataSource(final DataSource delegate) {
this.delegate = delegate;
}
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return (method.getName().equals("getConnection")) ? getConnection() : method.invoke(delegate, args);
}
DSLContext database = Mockito.mock(DSLContext.class, Mockito.RETURNS_DEEP_STUBS);
Mockito.when(database.select(ACTIVITY_TYPE.ID)
.from(ACTIVITY_TYPE)
.where(ACTIVITY_TYPE.SINGLE_PERSON_USABLE.isTrue())
.fetch(ACTIVITY_TYPE.ID))
.thenReturn(ImmutableList.of(singleActivityTypeId));
Mockito.when(database.select(ACTIVITY_TYPE.ID)
.from(ACTIVITY_TYPE)
@ericflo
ericflo / proxy.go
Last active April 17, 2024 21:27
Golang TCP Proxy
package proxy
import (
"io"
"net"
"sync"
log "github.com/Sirupsen/logrus"
)
@emdagon
emdagon / IncludeTemplate.coffee
Created May 1, 2015 20:08
Simple Component to include Meteor Templates on React Components
# see https://github.com/reactjs/react-meteor
# and https://github.com/jhartma/meteor-cjsx
@IncludeTemplate = React.createClass
componentDidMount: () ->
componentRoot = React.findDOMNode(@)
parentNode = componentRoot.parentNode
parentNode.removeChild(componentRoot);
Blaze.render @props.template, parentNode
@evands
evands / combine_matching_static_libraries.sh
Created January 15, 2015 02:55
Combine libraries of matching names but different architectures from directory $1 and directory $2 # into directory $3.
#!/bin/sh
#
# Combine libraries of matching names but different architectures from directory $1 and directory $2
# into directory $3.
#
# Usage:
# => combine_matching_static_libraries.sh DIR_INPUT_1 DIR_INPUT_2 DIR_OUTPUT
######
pushd $1
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@lvonk
lvonk / alternative_vault.py
Last active October 15, 2015 19:05
Alternative Ansible vault.
# Copyright 2014 Zilverline B.V.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
###########################################
# Copyright (c) 2014 Jonathan Barronville #
# License: MIT. #
###########################################
function fish_prompt
set last_command_status $status
echo ''