sudo service mysql stop
sudo mkdir -p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
mysql -u root
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 { google } = require("googleapis"); | |
const cloudfunctions = google.cloudfunctions("v1"); | |
async function main() { | |
const auth = new google.auth.GoogleAuth({ | |
scopes: ["https://www.googleapis.com/auth/cloud-platform"], | |
}); | |
const authClient = await auth.getClient(); | |
google.options({ auth: authClient }); |
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
superjson.registerCustom<Buffer, number[]>( | |
{ | |
isApplicable: (v): v is Buffer => v instanceof Buffer, | |
serialize: v => [...v], | |
deserialize: v => Buffer.from(v) | |
}, | |
"buffer" | |
); |
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 { project } from './project'; | |
const sourceFile = project.addSourceFileAtPath( | |
path.join(cwd(), 'src', './file.ts'), | |
); | |
const resolverClass = sourceFile.getClass('otherFile'); | |
for (const method of resolverClass.getMethods()) { | |
const decorators = []; | |
for (const decorator of method.getDecorators()) { |
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 query = { where: {} }; | |
const queryString = encodeURIComponent(JSON.stringify(query)); | |
const finalUrl = `http://127.0.0.1:3001/trpc/user.listUsers?${queryString}`; |
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
// First you define a method called `oneOfSchemas` | |
yup.addMethod(yup.MixedSchema, "oneOfSchemas", function (schemas) { | |
return this.test( | |
"one-of-schemas", | |
"Not all items in ${path} match one of the allowed schemas", | |
(item) => | |
schemas.some((schema) => schema.isValidSync(item, { strict: 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
(node OR nodejs OR "node js" OR "Node.js" OR nestjs OR expressjs) AND (remote OR remotely) NOT (ruby OR php OR go OR rust OR asp OR asp.net OR c# OR rails OR Selenium OR WebDriver OR "Java" OR "java" OR CyberCoders OR Revelo OR 10Clouds OR Manara) |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
This file has been truncated, but you can view the full file.
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
/\ |‾‾| /‾‾/ /‾‾/ | |
/\ / \ | |/ / / / | |
/ \/ \ | ( / ‾‾\ | |
/ \ | |\ \ | (‾) | | |
/ __________ \ |__| \__\ \_____/ .io | |
execution: local | |
script: loadtest.js | |
output: - |
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 { PrismaSelect } from '@paljs/plugins'; | |
export function Fields(): ParameterDecorator { | |
return createParamDecorator(({ info }) => { | |
const fieldsMap = new PrismaSelect(info).value; | |
return fieldsMap; | |
}); | |
} | |
NewerOlder