Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
benawad committed Feb 11, 2021
0 parents commit d8d9105
Show file tree
Hide file tree
Showing 172 changed files with 58,793 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
1 change: 1 addition & 0 deletions dinner/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
482 changes: 482 additions & 0 deletions dinner/package-lock.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions dinner/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "dinner",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "ts-node src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"puppeteer": "^5.5.0"
},
"devDependencies": {
"@types/node": "^14.14.22",
"@types/puppeteer": "^5.4.2",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
}
}
29 changes: 29 additions & 0 deletions dinner/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import puppeteer, { Browser } from "puppeteer";

const go = async (browser: Browser) => {
const context = await browser.createIncognitoBrowserContext();
const page = await context.newPage();
await page.goto("https://dogehouse.tv");
// await page.goto("http://localhost:3000");
page.on("dialog", async (dialog: any) => {
let s = Math.random().toString(36).substring(7);
await dialog.accept(s + s);

const el = await page.waitForSelector("button > div");
const room = (await el.$x(".."))[0];
await room.click();
});
const [button] = await page.$x("//button[contains(., 'create test user')]");
if (button) {
await button.click();
}
};

const main = async () => {
const browser = await puppeteer.launch({ headless: true });
for (let i = 0; i < 10; i++) {
go(browser);
}
};

main();
37 changes: 37 additions & 0 deletions dinner/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"lib": [
"dom",
"es6",
"es2017",
"esnext.asynciterable"
],
"sourceMap": true,
"outDir": "./dist",
"moduleResolution": "node",
"removeComments": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"baseUrl": "."
},
"exclude": [
"node_modules"
],
"include": [
"./src/**/*.tsx",
"./src/**/*.ts"
]
}
25 changes: 25 additions & 0 deletions kofta/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.eslintcache
.netlify
3 changes: 3 additions & 0 deletions kofta/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
npm run build
netlify deploy -d build --prod
Loading

0 comments on commit d8d9105

Please sign in to comment.