Skip to content

Instantly share code, notes, and snippets.

View jpiche's full-sized avatar

Joseph J. Piché jpiche

View GitHub Profile
@schmich
schmich / ducky.md
Last active January 18, 2026 08:51
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@hallettj
hallettj / Makefile
Last active December 10, 2023 13:32
Makefile for transpiling with Babel & Flow in a Node app, or in a client- or server-side shared library
# Makefile for transpiling with Babel in a Node app, or in a client- or
# server-side shared library.
.PHONY: all clean
# Install `babel-cli` in a project to get the transpiler.
babel := node_modules/.bin/babel
# Identify modules to be transpiled by recursively searching the `src/`
# directory.
@rauchg
rauchg / README.md
Last active May 16, 2026 01:17
require-from-twitter
@vasarhelyia
vasarhelyia / brewMVVM.swift
Last active January 13, 2018 20:01
Brew MVVM
class Brew {
var temp: Float = 0.0
}
class BrewViewModel : NSObject {
var brew = Brew()
dynamic var temp: Float = 0.0 {
didSet {
self.brew.temp = temp
}
@govert
govert / GpsUtils.cs
Last active March 2, 2026 06:56
Convert WGS-84 geodetic locations (GPS readings) to Cartesian coordinates in a local tangent plane (Geodetic to ECEF to ENU)
using System;
using System.Diagnostics;
using static System.Math;
// Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cartesian axis.
// The implementation here is according to the paper:
// "Conversion of Geodetic coordinates to the Local Tangent Plane" Version 2.01.
// "The basic reference for this paper is J.Farrell & M.Barth 'The Global Positioning System & Inertial Navigation'"
// Also helpful is Wikipedia: http://en.wikipedia.org/wiki/Geodetic_datum
@mitchellhislop
mitchellhislop / application.conf
Last active December 18, 2015 21:58
Logback xml for Scala/Play logging
db.default.logStatements=true
//Add that to the application.conf, and comment out the Logger lines (~50 - ~60). Restart the play app, and you are now logging with gas!
@jpiche
jpiche / my.cnf
Created April 12, 2013 19:46
Beyond what is shipped by default in MySQL or MariaDB my.cnf config files, I always make sure to put these in and edit memory settings appropriately.
[mysqld]
bind-address = 127.0.0.1
skip-name-resolve
default_storage_engine = InnoDB
innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 400
innodb_flush_method = O_DIRECT
@jpiche
jpiche / .vimrc
Last active October 13, 2015 23:27
A basic vimrc, perhaps for servers.
set nocp noswapfile
syn on
set ai bs=indent,eol,start et sm is ic scs ruler
set ts=2 sts=2 sw=2
set guioptions-=T
set mouse=
set number
autocmd FileType php set ts=4 sts=4 sw=4
@klucar
klucar / ECEF2LLA.java
Last active August 22, 2025 20:44
Java stubs for converting ECEF (Earth Centered Earth Fixed) coords to Latitude Longitude Altitude
/*
*
* ECEF - Earth Centered Earth Fixed
*
* LLA - Lat Lon Alt
*
* ported from matlab code at
* https://gist.github.com/1536054
* and
* https://gist.github.com/1536056