Skip to content

Instantly share code, notes, and snippets.

@bodograumann
bodograumann / gist:4044149
Created November 9, 2012 07:00 — forked from ssokolow/gist:1133645
XDG Basedir wrapper for Crayon Physics Deluxe
#/bin/sh
# XDG Base Directory Spec wrapper for Crayon Physics Deluxe as included in the
# Humble Indie Games Bundle 3
#
# Useful for hiding the non-hidden "Crayon Physics Deluxe" folder the game uses
# to store saved solutions
# Set this to where you installed Crayon Physics Deluxe
GAME_ROOT=~/Programme/CrayonPhysicsDeluxe
@bodograumann
bodograumann / array-of-array-alias.openapi.yaml
Last active January 10, 2020 15:48
OpenAPI specification to reproduce an error with arrays of an alias to an array
openapi: '3.0.2'
info:
version: '0.1.0'
title: Array of array alias test
paths:
/zoos:
post:
responses:
201:
description: Successfully created
@bodograumann
bodograumann / lsusb.out
Last active January 15, 2021 16:10
Debug output for pcscd with libusb 1.0.24 and Broadcom Corp 5880
Bus 001 Device 003: ID 0a5c:5832 Broadcom Corp. 5880
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0a5c Broadcom Corp.
@bodograumann
bodograumann / convert-syntax.md
Last active July 22, 2021 11:34
Converting from vue-property-decorator-style to script-setup-style

Container

Vue 2

<script lang="ts">
import { Component, …, Vue } from "vue-property-decorator";
…

@Component(…)
export default class … extends Vue {
@bodograumann
bodograumann / useModelState.spec.ts
Created June 29, 2021 11:04
Vue 3 composable: Internal model state
import { ref, toRaw, nextTick } from "vue";
import type { Ref } from "vue";
import useModelState from "../useModelState";
describe("useModelState", () => {
const initialValue = [0];
const updatedValue = [1];
const validator = (value?: Array<unknown>) =>
value !== undefined && value.length === 1;
const invalidValue = [0, 1];
@bodograumann
bodograumann / cheat-sheet.sh
Last active May 12, 2023 11:04
openapi-generator typescript contribution cheat sheet
# Rebuild project
mvn -T 8 clean package -DskipTests -Dmaven.javadoc.skip=true
# Generate sample clients
./bin/generate-samples.sh ./bin/configs/typescript-consolidated-*
# Build sample clients
for pom in samples/openapi3/client/petstore/typescript/builds/*/pom.xml
do
echo "[\e[1m$pom\e[0m]"