Skip to content

Instantly share code, notes, and snippets.

View jasonsturges's full-sized avatar

Jason Sturges jasonsturges

View GitHub Profile
@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>
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@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 / Command line
Last active August 31, 2022 02:50
Wiki.js
$ docker-compose up
Creating network "docker_default" with the default driver
Creating docker_wikidb_1 ... done
Creating docker_wikijs_1 ... done
Attaching to docker_wikidb_1, docker_wikijs_1
wikidb_1 | 2018-06-22T04:28:15.063+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=468ee589b69d
wikidb_1 | 2018-06-22T04:28:15.063+0000 I CONTROL [initandlisten] db version v3.6.5
wikidb_1 | 2018-06-22T04:28:15.063+0000 I CONTROL [initandlisten] git version: a20ecd3e3a174162052ff99913bc2ca9a839d618
wikidb_1 | 2018-06-22T04:28:15.064+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
wikidb_1 | 2018-06-22T04:28:15.064+0000 I CONTROL [initandlisten] allocator: tcmalloc
@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" },