Skip to content

Instantly share code, notes, and snippets.

@schmich
schmich / ducky.md
Last active September 17, 2024 13:43
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:

@amcgregor
amcgregor / 1-problem.md
Last active March 30, 2017 05:55
A thought experiment job interview question / session in assistance of a user on IRC seeking mock interview advice. WIP cleanup, see previous commits.

Ask me your questions, gatekeeper, I am not afraid.

Given the opening and closing times for a store, how would you store that data, then subsequently query it, so as to answer the question: at time X (for example, now,) is the store open or closed?

What are the times?

Open 9:30am Monday, closes 5:30pm Monday. Tuesday through Friday open from 7am until 11pm. Saturday open from 11am to 4pm. Sunday closed.

:scribbles that on the whiteboard:

#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#define streq(a, b) (!strcmp((a), (b)))
#ifndef __USE_GNU
#define __USE_GNU
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active September 17, 2024 13:07
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active August 30, 2024 08:37
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying