Skip to content

Instantly share code, notes, and snippets.

@yi719
yi719 / change-shift-to-next-input-source.json
Last active February 18, 2023 14:32
Karabiner-Elements: change-shift-to-next-input-source
{
"title": "Change shift to previous input source",
"rules": [
{
"description": "Change shift to previous input source if pressed alone",
"manipulators": [
{
"from": {
"key_code": "left_shift"
},
@yi719
yi719 / MpscBoundedMailbox.java
Created December 23, 2017 03:41 — forked from guidomedina/MpscBoundedMailbox.java
MpscBoundedMailbox
import akka.actor.ActorRef;
import akka.dispatch.*;
import org.jctools.queues.MpscArrayQueue;
/**
* Non-blocking, multiple producer, single consumer high performance bounded message queue,
* this implementation is similar but simpler than LMAX disruptor.
*/
public final class MpscBoundedMailbox implements MessageQueue {
@yi719
yi719 / pedantically_commented_playbook.yml
Created August 1, 2016 07:33 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@yi719
yi719 / mvn-ensime.py
Last active August 29, 2015 14:11 — forked from ihodes/mvn-ensime.py
# example .ensime generation
# Maven to Ensime config. convertor:
#
# Prints .ensime configuration for Maven project.
#
# USAGE:
# mvn-ensime PROJECT_NAME PROJECT_PACKAGE ROOT_DIR TARGET_DIR SOURCE_DIRS*
#
python mvn-ensime.py adam org.bdgenomics.adam \
@yi719
yi719 / gist:1465195
Created December 12, 2011 05:39 — forked from jamescasbon/template.py
Pure python templates using with statement
"""
A really stupid python template language inspired by coffeekup, markaby.
Do not use this code, it will ruin your day. A byproduct of insomnia.
TL;DR
-----
This module defines a template language that allows us to do:
d = Doc()