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 | |
// @ts-check | |
const { execSync } = require("child_process"); | |
const { manifest } = require("pacote"); | |
const { join } = require("path"); | |
const { promises } = require("fs"); | |
function getPackageJsonFiles() { | |
return execSync("git ls-files | grep package.json") |
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
import { CoreTracer, Span, Tracer } from "@opencensus/core"; | |
import { StackdriverTraceExporter } from "@opencensus/exporter-stackdriver"; | |
import { TracingBase } from "@opencensus/nodejs-base"; | |
import { TraceContextFormat } from "@opencensus/propagation-tracecontext"; | |
import { Request } from "express"; | |
import { ServerResponse } from "http"; | |
function getOperationName(req: Request): string | undefined { | |
if (req.baseUrl === "/graphql" && req.method === "POST") { | |
return req.body.operationName; |
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 | |
const { version } = require('./package.json'); | |
const { ExtractGQL } = require('persistgraphql/lib/src/ExtractGQL') | |
const { addTypenameTransformer } = require('persistgraphql/lib/src/queryTransformers') | |
const { parse, separateOperations } = require('graphql') | |
const { writeFileSync } = require('fs') | |
const { URLSearchParams } = require('url'); | |
const yargs = require('yargs') |
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 | |
const fs = require("fs"); | |
const path = require("path"); | |
const madge = require("madge"); | |
const { parse } = require("@babel/parser"); | |
const traverse = require("@babel/traverse").default; | |
const { isImportDeclaration, isImportSpecifier } = require("@babel/types"); | |
const chalk = require("chalk"); |
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
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_B | |
// Test Case | |
// Input | |
// 5 100 | |
// p1 150 | |
// p2 80 | |
// p3 200 | |
// p4 350 | |
// p5 20 |
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
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_A | |
// Test Case | |
// Input | |
// 34 116 + 20 5 - 5 - 1 * + | |
// Output | |
// 160 | |
var input = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split(' ').map(function(value) { |
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
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_2_D | |
// Test Case | |
// Input | |
// 5 | |
// 5 | |
// 1 | |
// 4 | |
// 3 | |
// 2 |
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
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_2_C | |
// Test Case | |
// Input | |
// 5 | |
// H4 C9 S4 D2 C3 | |
// Output | |
// D2 C3 H4 S4 C9 | |
// Stable |
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
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_2_B | |
// Test Case | |
// Input | |
// 6 | |
// 5 2 4 6 1 3 | |
// Output | |
// 1 2 3 4 5 6 | |
// 3 |
NewerOlder