Skip to content

Instantly share code, notes, and snippets.

@Mars073
Mars073 / index.html
Created April 16, 2022 19:37
How to use a module from a cdn in vue.js by importing it from a script tag, gist with the three.js library. Pro tip: you can install `@types/three` in devDependencies to have autocompletion
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ... -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"
integrity="sha512-dLxUelApnYxpLt6K2iomGngnHO83iUvZytA3YjDUCjT0HDOHKXnVYdf3hU4JjM8uEhxf9nD1/ey98U3t2vZ0qQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
import { BufferAttribute, BufferGeometry } from 'three'
export const outerWidth = 200
export const outerLength = 200
export default class LandscapeGeometry extends BufferGeometry {
private innerWidth: number
private innerLength: number
constructor (inWidth = 200, inLength = 100) {
@Mars073
Mars073 / app.js
Created April 3, 2021 14:55
a basic example to implement "login with steam" on Node js without passport (url generation + validation)
import express from 'express'
import axios from 'axios'
const app = express()
// settings:
const steam_url = 'https://steamcommunity.com/openid/login'
const steam_api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' // don't share it 🙈
const service_url = 'http://localhost:83'
const login_path = '/login'
const login_cb_path = '/login_callback'