Skip to content

Instantly share code, notes, and snippets.

View jasonsturges's full-sized avatar

Jason Sturges jasonsturges

View GitHub Profile
@jasonsturges
jasonsturges / SimpleCameraController.cs
Last active September 30, 2022 02:44
Unity Simple Camera Controller
using UnityEngine;
// Note: This script is a duplicate of the one provided by UnityTemplateProjects.
namespace UnityTemplateProjects
{
public class SimpleCameraController : MonoBehaviour
{
class CameraState
{
@jasonsturges
jasonsturges / Blonde Fraktur.fnt
Created March 26, 2022 20:46
Blonde Fraktur clock font
<?xml version='1.0'?>
<font>
<info aa='1' size='240' smooth='1' stretchH='100' bold='0' padding='0,0,0,0' spacing='0,0' charset='' italic='0' unicode='0' face='Blonde Fraktur'/>
<common scaleW='576' packed='0' pages='1' lineHeight='380' scaleH='512' base='269'/>
<pages>
<page id='0' file='Blonde Fraktur.png'/>
</pages>
<chars count='11'>
<char xadvance='39' x='2' chnl='0' yoffset='269' y='496' xoffset='0' id='32' page='0' height='0' width='0'/>
<char xadvance='90' x='466' chnl='0' yoffset='83' y='2' xoffset='-7' id='49' page='0' height='194' width='98'/>
@jasonsturges
jasonsturges / Eurostile.fnt
Last active March 26, 2022 20:29
Eurostile Bitmap Font Glyphs
<?xml version='1.0'?>
<font>
<info aa='1' size='180' smooth='1' stretchH='100' bold='0' padding='0,0,0,0' spacing='0,0' charset='' italic='0' unicode='0' face='Eurostile'/>
<common scaleW='1216' packed='0' pages='1' lineHeight='180' scaleH='1152' base='121'/>
<pages>
<page id='0' file='Eurostile.png'/>
</pages>
<chars count='95'>
<char xadvance='45' x='1160' chnl='0' yoffset='121' y='118' xoffset='0' id='32' page='0' height='0' width='0'/>
<char xadvance='56' x='158' chnl='0' yoffset='-1' y='580' xoffset='14' id='33' page='0' height='124' width='32'/>
@jasonsturges
jasonsturges / ApplicationDbContext.cs
Created June 10, 2021 15:40
ASP.NET Core with MySQL
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
public class ApplicationDbContext : IdentityDbContext
{
// ...
protected override void OnModelCreating(ModelBuilder builder)
@jasonsturges
jasonsturges / .gitignore
Last active May 14, 2021 07:00
Creating a TypeScript NPM Package
node_modules
build
dist
docs
@jasonsturges
jasonsturges / output.md
Last active March 4, 2021 17:23
Drop Decimal Test Suite
double not operator
    min: 6.25000    avg: 8.41969    max: 11.04000    ops/second: 123,911,231

or operator
    min: 7.30000    avg: 9.52969    max: 10.75000    ops/second: 107,329,250

signed right shift operator
    min: 7.07500    avg: 10.00412   max: 10.79500    ops/second: 101,645,033
@jasonsturges
jasonsturges / Button.stories.js
Last active January 28, 2021 04:54
Storybook with React, Redux, and Material UI
import React from 'react';
import { Button } from './Button';
export default {
title: 'Example/Button',
argTypes: {
backgroundColor: { control: 'color' },
primary: { control: "boolean" },
label: { control: "text" },
@jasonsturges
jasonsturges / noiseWithSmoothness.swift
Last active December 26, 2020 23:02
SpriteKit Procedurally Generated Noise
let noiseTexture = SKTexture(noiseWithSmoothness: 1.1,
size: CGSize(width: 1024, height: 768),
grayscale: false)
let noiseSprite = SKSpriteNode(texture: noiseTexture)
@jasonsturges
jasonsturges / App.svelte
Created December 11, 2020 20:21
3D with Svelte and Babylon.js
<script>
import { onMount } from 'svelte';
import { createScene } from "./scene";
let el;
onMount(() => {
createScene(el)
});
</script>
@jasonsturges
jasonsturges / App.svelte
Created December 11, 2020 19:24
3D with Svelte and Three.js
<script>
import { onMount } from 'svelte';
import { createScene } from "./scene";
let el;
onMount(() => {
createScene(el)
});
</script>