Skip to content

Instantly share code, notes, and snippets.

View jrasanen's full-sized avatar
🦁

Jussi Räsänen jrasanen

🦁
  • Internet
View GitHub Profile
@jrasanen
jrasanen / source-map-unpacker.js
Created January 18, 2024 20:25 — forked from zxbodya/source-map-unpacker.js
script to extract sources, from sourcesContent field in sourcemap
'use strict';
var fs = require('fs');
var maps = [
fs.readFileSync('./main.xxxx.js.map'),
fs.readFileSync('./1.chunk.xxxx.js.map'),
fs.readFileSync('./2.chunk.xxxx.js.map'),
fs.readFileSync('./3.chunk.xxxx.js.map')
];
@jrasanen
jrasanen / fna-wasm-instructions.md
Created September 30, 2023 14:07 — forked from TheSpydog/fna-wasm-instructions.md
How to build your FNA game for WebAssembly

How to build your FNA game for WebAssembly

WARNING: This process is EXTREMELY experimental and not officially supported yet!

Thanks to the ongoing work on .NET WebAssembly support, it is now possible to build FNA games for the web!

If you decide to give this a try, be sure to tell us about it in the FNA Discord! I'm happy to help if you run into problems or have any further questions that are not answered here.

The Basics

PS C:\Users\jussi\RustroverProjects\untitled> trunk serve -vv
2023-09-22T15:47:01.732692Z INFO run:build:build: starting build
2023-09-22T15:47:01.732998Z INFO run: spawning asset pipelines
2023-09-22T15:47:01.778123Z INFO build:cargo_build: building untitled
2023-09-22T15:47:01.778187Z DEBUG build:cargo_build:run_command: cargo args args=["build", "--target=wasm32-unknown-unknown", "--manifest-path", "C:\\Users\\jussi\\RustroverProjects\\untitled\\Cargo.toml"]
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
2023-09-22T15:47:01.825367Z INFO build:cargo_build: fetching cargo artifacts
2023-09-22T15:47:01.870946Z INFO build:cargo_build: processing WASM for untitled
2023-09-22T15:47:01.879886Z INFO build:wasm_bindgen_build:get: using system installed binary app=wasm-bindgen version=0.2.87 app=WasmBindgen version=None
2023-09-22T15:47:01.879999Z INFO build:wasm_bindgen_build: calling wasm-bindgen for untitled
#!/usr/bin/env bb
(require '[babashka.process :refer [process shell sh pipeline pb]])
(def +api-url+ "https://gitlab.com/api/v4")
(def +gitlab-personal-token+ (System/getenv "GITLAB_ACCESS_TOKEN"))
(def +gitlab-user+ (System/getenv "GITLAB_USERNAME"))
;;
;; Utils
;;
[[language]]
name = "rust"
scope = "source.rust"
injection-regex = "rust"
file-types = ["rs"]
roots = ["Cargo.toml", "Cargo.lock"]
auto-format = true
comment-token = "//"
# language-server = { command = "rust-analyzer" }
language-server = { command = "rustup", args = ["run", "nightly", "rust-analyzer"] }
// swift-tools-version:5.2
import PackageDescription
let package = Package(
name: "swiftest",
platforms: [
.macOS(.v10_15)
],
dependencies: [
// 💧 A server-side Swift web framework.
@jrasanen
jrasanen / main.lua
Created July 17, 2020 16:39 — forked from randrews/main.lua
Example code for nice-feeling player movement in Love
require 'point'
function love.load()
math.randomseed(os.time())
love.physics.setMeter(32)
love.graphics.setBackgroundColor(64, 120, 64)
world = love.physics.newWorld(0, 0)
crates = { makeCrate(world, 5, 5),
makeCrate(world, 5, 6) }
#!/bin/bash
until docker info &> /dev/null
do
echo "Waiting for the docker engine to start ..."
sleep 1
done
docker-compose up
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Usage:
python3 http-debug-server.py -a <bind-address> -p <bind-port>
'''
import json
import string
from pprint import pprint
["~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\"],
[{w:1.75},"Esc","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"],
[{w:2.25},"LShift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"RShift"],
[{w:1.25},"LCtrl",{w:1.25},"LAlt",{w:1.25},"LWin",{w:6.25},"Space",{w:1.25},"Fn0",{w:1.25},"RWin",{w:1.25},"Menu",{w:1.25},"RCtrl"]