Skip to content

Instantly share code, notes, and snippets.

{
"__header__": {
"fileType": "LDtk Project JSON",
"app": "LDtk",
"doc": "https://ldtk.io/json",
"schema": "https://ldtk.io/files/JSON_SCHEMA.json",
"appAuthor": "Sebastien 'deepnight' Benard",
"appVersion": "1.1.3",
"url": "https://ldtk.io"
},
@agmcleod
agmcleod / nestjs-notes.md
Created March 10, 2022 16:58
NestJS notes

NestJS

For getting started with NestJS I highly recommend looking over the official documentation. The overview section & fundamentals covers a lot of great information as to how one builds a backend application with NestJS. https://docs.nestjs.com/first-steps.

It will also cover adding dependencies for various features like configuration, typeorm, graphql via apollo, etc.

When setting up the project via nest new <project-name> it will create a starting project, along with git repository. If your git is configured to have the default branch of master, be sure to change the branch of the nest project to something more inclusive like main or dev. Also be sure to update your git configuration to use this by default

git config --global init.defaultBranch main

use debug_gfx::draw_nav_mesh;
use std::fs::File;
use std::io::prelude::*;
use std::io::Result;
mod debug_gfx;
fn read_file(path: &str) -> Result<String> {
let mut text = String::new();
let mut file = File::open(path)?;
{
"openapi" : "3.0.0",
"info" : {
"title" : "Simple Inventory API",
"description" : "This is a simple API",
"contact" : {
"email" : "you@your-company.com"
},
"license" : {
"name" : "Apache 2.0",
@agmcleod
agmcleod / App.css
Created November 22, 2019 21:02
This can be tested via create react app.
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
}
.App-header {
background-color: #282c34;
@agmcleod
agmcleod / state.rs
Created June 30, 2018 14:31
State management rust, snippet
pub mod play_state;
use std::sync::{Arc, Mutex};
use specs::World;
use std::collections::HashMap;
use scene::Node;
use conrod::backend::gfx::Renderer;
@agmcleod
agmcleod / webgl-gallery-steps.js
Last active July 7, 2016 00:11
webgl gallery steps

Podcasts and why

  • Back to Work - Life style podcast. Dan benjamin & Merlin Mann. DB is owner of 5by5 podcast network. He and merlin chat about productivity, work flows, life and work balance, past experiences, nerdy things.
  • Quit - Dan benjamin & Haddie cook. Dan & his employee Haddie answer listener emails about jobs, quitting, hiring, doing your own thing. A bit more infrequent of a podcast
  • Road work - Life style podcast. Dan benjamin & John Roderick. They talk about all sorts of life experiences. Drugs, food, travel, music.
  • Accidental Tech Podcast - Marco Arment, John Siracusa, Casey Liss. Three programmers working in different facets of the industry talk a lot about Apple tech, but other things of interest as well. Occasionally about cars & tesla as well.
  • Reconcilable differences - Life style podcast. Merlin Mann & John Siracusa talk about how they got the way they are.
  • Lostcast - Podcast between two gamedevs as they work on their new game. Talk about design, developme
@agmcleod
agmcleod / application.js
Created April 24, 2016 21:45
React on rails configs
// DO NOT REQUIRE jQuery or jQuery-ujs in this file!
// DO NOT REQUIRE TREE!
// CRITICAL that vendor-bundle must be BEFORE bootstrap-sprockets and turbolinks
// since it is exposing jQuery and jQuery-ujs
//= require vendor-bundle
//= require server-bundle
//= require turbolinks
extern crate rand;
use std::cmp;
use std::collections::HashMap;
use rand::distributions::{IndependentSample, Range};
#[derive(Debug)]
struct Boss {
hp: i32,
damage: i32