Skip to content

Instantly share code, notes, and snippets.

@audrow
audrow / deno-web-dev-notes.md
Created December 16, 2021 15:24
Deno Web Development by Alexandre Portela Notes #book #webdev

Deno Web Development by Alexandre Portela Notes

  • Architecture
    • Create a top level index.ts file for entry point
    • Create a top level deps.ts file for dependencies and use this file to generate a lock file
    • Every data object has its own folder
      • repository folder for in memory or database
      • controller.ts for main operations
      • index.ts for export
        export type MyType = ...
        
@audrow
audrow / fcc-react.md
Created December 16, 2021 15:26
Free Code Camp's React tutorial #course #webdev

Free Code Camp React Tutorial

  • React lets you compose your UI from many separate, isolated compontents, which makes building and maintenence easier
  • Syntax
    • Valid JSX must be inside of a single element
    • JSX looks like HTML with Javascript in curly braces
      • Valid comments are structured as follows: {/* my comment */}
      • class in html becomes className
      • Use camel case for naming convention, like onClick and onChange
      • Every tag must be self-closing (<br />) or closed (<div> </div>), but it cannot be left open (<br> must be <br/>)
  • Functions must begin with a capital letter, e.g., DemoComponent
@audrow
audrow / bjj.md
Last active January 3, 2022 21:45
Brazilian Jiu Jitsu notes #notes

Brazilian jiu-jitsu notes

Advice

  • Focus on control, then add strength
@audrow
audrow / __init__.py
Created December 16, 2021 16:25
Make a Jenkins CI job #open-robotics
#!/usr/bin/env python3
import argparse
import jenkins
import logging
import os
import time
logging.basicConfig(level=logging.INFO)
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
@audrow
audrow / index.test.ts
Last active December 31, 2021 05:43
Recipes with a common ingredient #teaching
// Test with deno test
import { getRecipesWithIngredients, isIngredientsInRecipe, recipes } from "./index.ts"
import { assert, assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
Deno.test('getRecipesWithNumbers', () => {
{
const results = getRecipesWithIngredients(recipes, [1, 2, 3, 4]);
assert(results.length === 0);
}
@audrow
audrow / 0-generate-system-viewer-data.md
Last active January 15, 2022 22:27
Generate ROS 2 bag for System Viewer #open-robotics

README

There are two zip files:

  • A ROS 2 package for generating a bagfile of spoof data
  • A generated bagfile

The bag has two topics:

repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint: