Skip to content

Instantly share code, notes, and snippets.

View example.yaml
openapi: 3.0.0
info:
title: Sample API
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
version: 0.1.9
servers:
- url: http://api.example.com/v1
description: Optional server description, e.g. Main (production) server
- url: http://staging-api.example.com
description: Optional server description, e.g. Internal staging server for testing
View node.ts
// The ./types module provides helper types for your Input events and messages.
import { Input, Message } from "./types";
// Your node can output well-known message types, any of your custom message types, or
// complete custom message types.
//
// Use `Message` to access your data source types or well-known types:
// type Twist = Message<"geometry_msgs/Twist">;
//
// Conventionally, it's common to make a _type alias_ for your node's output type
View diagnostic.json
{
"header": {
"stamp": {
"sec": 123,
"nsec": 123,
},
"frame_id": "",
"seq": 0,
},
"status": [{
@defunctzombie
defunctzombie / README.md
Last active Jan 25, 2022
foxglove/studio/gh-2718
View README.md
yarn
yarn start
View index.js
const worker = new Worker(new URL("./worker.js", import.meta.url));
const input = document.createElement("input");
input.type = "file";
document.body.appendChild(input);
input.onchange = (ev) => {
const file = ev.target.files[0];
worker.postMessage({ file });
};
View foo.json
"syntax": "proto3",
"root": {
"name": "",
"fullName": "",
"syntaxType": "ProtoRoot",
"nested": {
"Person": {
"name": "Person",
"fullName": ".Person",
View obj.json
{
"action": {
"type": "SAVE_PANEL_CONFIGS",
"payload": {
"configs": [
{
"id": "onboarding.welcome!24okipi",
"config": {}
}
]
View main.js
const HID = require("node-hid");
const vendorId = 4617;
const productId = 17185;
async function main() {
const device = new HID.HID(vendorId, productId);
device.on("error", (err) => {
console.error(err);
@defunctzombie
defunctzombie / C-states.md
Created Jul 5, 2016 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?
View C-states.md

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@defunctzombie
defunctzombie / dell-3010cn.ppd
Created Dec 28, 2014
Dell 3010cn Postscript Printer Definition
View dell-3010cn.ppd
*PPD-Adobe: "4.3"
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the