Skip to content

Instantly share code, notes, and snippets.

@qerub
qerub / properties.xml
Created June 25, 2016 22:01
Good starter properties for Java 8 and Maven
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
@qerub
qerub / lifx.yaml
Created June 25, 2016 23:00
First stab at a Swagger/OpenAPI specification for the LIFX API
swagger: "2.0"
info:
title: LIFX HTTP Remote Control API
version: v1
description: https://api.developer.lifx.com/
host: api.lifx.com
basePath: /v1
schemes:
- https
produces:
@qerub
qerub / httpsExchange.ts
Created December 18, 2016 00:24
[TypeScript] Dependency-free Promise-based Node.js HTTP client
// Based on https://www.tomas-dvorak.cz/posts/nodejs-request-without-dependencies/
import * as https from "https";
async function httpsExchange(requestOptions: https.RequestOptions): Promise<string> {
return new Promise<string>((resolve, reject) => {
const request = https.request(requestOptions, (response) => {
if (response.statusCode < 200 || response.statusCode > 299) {
reject(new Error("Non-2xx status code: " + response.statusCode));
}
@qerub
qerub / index.md
Last active December 22, 2024 10:24
Useful macOS commands

How to list non-Apple kernel extensions

kextstat | egrep -v '\bcom.apple.'

How to restart the computer without having to manually unlock FileVault

sudo fdesetup authrestart