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 expressHandlebars from "express-handlebars"; | |
// setup handlebars for view templates: | |
const hbs = expressHandlebars.create({ | |
extname: ".hbs", | |
helpers: { /* ... handlebars helpers */ }, | |
}); | |
// The express handlebars package in theory allows setting values in the | |
// handlebars `data` side-channel, however, the the way to set this value is via |
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
[core] | |
logallrefupdates=true | |
autocrlf = false | |
quotepath = false | |
excludesfile = ~/.config/git/ignore | |
[fetch] | |
prune = true | |
[push] | |
default = current | |
[pull] |
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 { readFile } from 'node:fs/promises' | |
async function main(args) { | |
const file = args[2]; | |
const contents = await readFile(args[2], { encoding: "utf8" }) | |
const session = JSON.parse(contents)[0]; | |
let count = 0; | |
for (const windowId in session.windows) { | |
const window = session.windows[windowId]; |
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
const rows = document.querySelectorAll("#pricing tbody > tr"); | |
let csv = "TLD,Register Price,Special Price,Renew Price,Special Renew Price\n"; | |
for(let row of rows) { | |
let tld = row.querySelector(".gb-tld-name").innerText; | |
let newPrice = "",newPriceSpecial = "",renewPrice = "",renewPriceSpecial = ""; | |
let $NewPrice = row.querySelector("td:nth-child(2) > span:not(.gb-price--sale)"); | |
let $RenewPrice = row.querySelector("td:nth-child(3) > span:not(.gb-price--sale)"); | |
if ($NewPrice) { | |
newPrice = $NewPrice.innerText.substr(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
From 02781bb4d71e90d50fae65a56becff3686220966 Mon Sep 17 00:00:00 2001 | |
From: Micheil Smith <micheil@brandedcode.com> | |
Date: Thu, 18 Feb 2010 19:02:55 +1100 | |
Subject: [PATCH] Adding interface between node and libeio for Chmod. | |
--- | |
doc/api.txt | 6 +++++- | |
src/node.js | 11 +++++++++++ | |
src/node_file.cc | 24 ++++++++++++++++++++++++ | |
test/mjsunit/test-fs-chmod.js | 27 +++++++++++++++++++++++++++ |
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 { Kafka, Consumer, Producer, KafkaMessage } from "kafkajs"; | |
import { Logger } from "pino"; | |
import { EventEmitter } from "events"; | |
import uuidv4 from "uuid/v4"; | |
type Options = { | |
groupId: string; | |
topicPrefix: string; | |
logger: Logger; | |
}; |
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 loadable, { LoadableComponent } from '@loadable/component'; | |
import { RouteComponentProps } from 'react-router-dom'; | |
import { StaticContext } from 'react-router'; | |
import { LocationState } from 'history'; | |
// Autogenerated Types for the Capabilities and their Screens: | |
import { Capabilities, Screens } from './routeTypes'; | |
export * from 'react-router-dom'; | |
export function createScreen< |
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 | |
/** | |
* This file does not use typescript as it's run before you've necessarily run `yarn install` | |
* As such, we can only use built-in modules here. | |
*/ | |
function main() { | |
let [ | |
// Arguments from the githook: https://git-scm.com/docs/githooks#_post_checkout |
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 path from 'path'; | |
const debug = require('debug')('cli:bootstrap'); | |
debug({ | |
npm_lifecycle_script: process.env.npm_lifecycle_script, | |
npm_config_argv: process.env.npm_config_argv, | |
npm_config_username: process.env.npm_config_username, | |
}); |
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
diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh | |
index ac53d63869..edb619726e 100755 | |
--- a/t/t5571-pre-push-hook.sh | |
+++ b/t/t5571-pre-push-hook.sh | |
@@ -19,14 +19,31 @@ test_expect_success 'setup' ' | |
test_commit one && | |
git push parent1 HEAD:foreign | |
' | |
+ | |
+COMMIT1="$(git rev-parse HEAD)" |
NewerOlder