This is a useful package.json from an actual user, as opposed to an artificial/fabricated app. It should be fairly representative of the sort of things users do.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
touchpad { | |
tap | |
natural-scroll | |
} | |
mouse { | |
// natural-scroll | |
// accel-speed 0.2 | |
// accel-profile "flat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is a translation of https://gitea.treehouse.systems/treehouse/mastodon/src/branch/main/Dockerfile to KDL | |
// This needs to be bookworm-slim because the Ruby image is built on bookworm-slim | |
ARG NODE_IMAGE="node:20.8-bookworm-slim" | |
ARG RUBY_IMAGE="ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim" | |
// hadolint ignore=DL3006 | |
FROM "${RUBY_IMAGE}" as="ruby" | |
// build-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a KDL translation of https://gitea.treehouse.systems/treehouse/mastodon/src/branch/main/docker-compose.yml, | |
// with some examples of proposed KDL 2.0 grammar sprinkled in with comments. | |
version "3" | |
services { | |
db { | |
restart "always" | |
image "postgres:14-alpine" | |
shm_size "256mb" | |
networks { | |
- "internal_network" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**package | |
{ | |
"name": "test-pkg", | |
"version": "1.2.3", | |
"dependencies": { | |
"lodash": "*", | |
} | |
} | |
**/ | |
console.log('hello'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::Score; | |
pub trait Measure: std::fmt::Debug + Sync + Send { | |
fn calculate(&self, scores: Vec<(&Score, f32)>) -> f32; | |
} | |
#[derive(Debug, Clone, Default)] | |
pub struct WeightedMeasure; | |
impl Measure for WeightedMeasure { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[PROFILE] | |
[TITLE:WELL-PREPPED (0XABADIDEA STYLE)] | |
[SKILL:1:MINING:5] | |
[SKILL:1:HAMMER:2] | |
[SKILL:1:SWIMMING:2] | |
[SKILL:1:MELEE_COMBAT:1] | |
[SKILL:2:MINING:5] | |
[SKILL:2:SWORD:2] | |
[SKILL:2:CROSSBOW:2] | |
[SKILL:2:SWIMMING:1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// match ABNF | |
Match := 'match' '(' RHSExpr ')' '{' MatchClause* '}' | |
MatchClause := MatchClauseLHS '=>' FatArroyRHS MaybeASI | |
MatchClauseLHS := [MatcherExpr] (LiteralMatcher | ArrayMatcher | ObjectMatcher | JSVar) | |
MatcherExpr := LHSExpr | |
LiteralMatcher := LitRegExp | LitString | LitNumber | |
ArrayMatcher := '[' MatchClauseLHS [',', MatchClauseLHS]* ']' // and... whatever it takes to shove ...splat in there | |
ObjectMatcher := '{' (JSVar [':' MatchClauseLHS]) [',' (JSVar [':', MatchClauseLHS])]* '}' // see above note about ...splat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const BB = require('bluebird') | |
const cacache = require('cacache') | |
const npa = require('npm-package-arg') | |
const pickManifest = require('npm-pick-manifest') | |
const ssri = require('ssri') | |
module.exports = cachedVersions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1))) | |
async function main(argv) { | |
console.log(argv.slice(2)) | |
} |
NewerOlder