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 { | |
PinionContext, | |
toFile, | |
renderTemplate, | |
prompt | |
} from '@featherscloud/pinion' | |
interface Context extends PinionContext { | |
name: string | |
} |
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 { hooks, NextFunction } from '@feathersjs/hooks' | |
import { authenticate } from '@feathersjs/authentication' | |
import { HookContext } from './declarations' | |
const logRuntime = async (context: HookContext, next: NextFunction) => { | |
const start = Date.now() | |
// Pass to the next hooks in the chain and the service method | |
await next() | |
// Log the total runtime |
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 { schema, Infer } from '@feathersjs/schema' | |
export const userSchema = schema({ | |
$id: 'User', | |
type: 'object', | |
additionalProperties: false, | |
required: ['email', 'password'], | |
properties: { | |
id: { type: 'number' }, | |
email: { type: 'string' }, |
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 logging import NullHandler | |
from tapsdk import TapSDK, TapInputMode | |
from tapsdk.models import AirGestures | |
import time | |
import rtmidi | |
import asyncio | |
midiout = rtmidi.MidiOut() | |
available_ports = midiout.get_ports() |
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 querystring = require('qs'); | |
class MultiClientOauth extends OAuthStrategy { | |
async getRedirect (data, params) { | |
const redirectUrl = (params && params.redirect) || '/'; | |
const { redirect } = this.authentication.configuration.oauth; | |
if (!redirect) { | |
return null; | |
} |
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
// If your module loader supports the `browser` package.json field | |
import { batchClient } from 'feathers-batch'; | |
// Alternatively | |
import { batchClient } from 'feathers-batch/client'; | |
const client = feathers(); | |
// configure Feathers client here | |
// `batchClient` should be configured *after* | |
// any other application level hooks |
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
// Add to src/services/index.js | |
const { BatchService } = require('feathers-batch'); | |
module.exports = function (app) { | |
// ... | |
app.use('/batch', new BatchService(app)); | |
} |
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 Queue = require('bull'); | |
const app = require('./app'); | |
const redisUrl = 'redis://localhost:6379'; | |
const messageQueue = new Queue('add-message', redisUrl, { | |
defaultJobOptions: { | |
removeOnComplete: true | |
} | |
}); |
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 runOp = args => { | |
const cmd = 'op'; | |
const proc = spawn(cmd, args, { | |
stdio: [ | |
'inherit', | |
'pipe', | |
'inherit' | |
] | |
}); |
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
{ | |
"scripts": { | |
"update-dependencies": "ncu -u" | |
}, | |
"devDependencies": { | |
"npm-check-updates": "^4.1.2" | |
} | |
} |
NewerOlder