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 'ts-morph'; | |
import * as path from 'path'; | |
import * as fs from 'fs'; | |
// Initialize a new ts-morph project | |
const project = new Project(); | |
// Specify the directory of the ui-components package | |
const uiComponentsDir = path.resolve(__dirname, 'libs/ui-components/src'); | |
const otherPackagesDir = path.resolve(__dirname, 'apps'); |
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
rules_version = '2'; | |
// Example rules for chat app | |
// https://www.youtube.com/watch?v=zQyrwxMPm88 | |
// collections: "users", "messages", "banned" | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
match /{document=**} { | |
allow read, write: if false; |
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 getData = async () => { | |
/** 1. Everything as one big fetch: */ | |
let res_1 = await fetch('https://icanhazdadjoke.com/search?term=music&limit=3', { | |
headers: { accept: 'application/json' }, | |
}); | |
/** 2. Split above into smaller chunks 🪓 */ | |
/* 2.1. Set search params values */ | |
let term = 'music'; |
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 express from "express"; | |
const app = express(); | |
const port = 8080; | |
app.get("/", (req, res) => { | |
res.send("Cześć świecie 👋"); | |
}); | |
app.listen(port, () => { |
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 name = "NAME" |
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
console.log("cześć świat"); |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: '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
const path = require('path'); | |
const { GraphQLClient } = require(`graphql-request`); | |
const parseGHUrl = require(`parse-github-url`); | |
/** | |
* Used to gather repo details data | |
*/ | |
const githubApiClient = process.env.GITHUB_TOKEN | |
? new GraphQLClient(`https://api.github.com/graphql`, { | |
headers: { |
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
// To poniżej wywołać w PowerShell | |
code --list-extensions | ForEach-Object {"code --install-extension $_"} > extensions.ps1 | |
// Na drugim komputerze: | |
.\extensions.ps1 |
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 React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import { withAuthenticator } from 'aws-amplify-react' | |
import { API, graphqlOperation } from 'aws-amplify' // dodajemy komunikację z API na froncie | |
// Pytamy API o listę wszystkich notatek | |
const ListNotes = ` | |
query { |
NewerOlder