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
View source-map-unpacker.js
'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
View fna-wasm-instructions.md

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

@jrasanen
jrasanen / main.lua
Created July 17, 2020 16:39 — forked from randrews/main.lua
Example code for nice-feeling player movement in Love
View main.lua
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) }
@jrasanen
jrasanen / layout.kbd.json
Created November 20, 2018 17:04 — forked from mmynsted/layout.kbd.json
Untitled Keyboard Layout
View layout.kbd.json
[
[
"Esc",
"F1",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
@jrasanen
jrasanen / docker-destroy-all.sh
Created April 24, 2017 07:10 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
View docker-destroy-all.sh
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@jrasanen
jrasanen / promise-all.clj
Created April 21, 2017 20:26 — forked from abarnash/promise-all.clj
Clojure implementation of all(promises).then(...) pattern from JavaScript
View promise-all.clj
(defn getPromiseFn
[aPromise]
(fn [num] (Thread/sleep 10000)
(deliver aPromise (str num " done"))))
(def proms [(promise) (promise) (promise)])
(def promFns (map getPromiseFn proms))
(future (map deref proms))
(future (map promFn (range 0 (count proms))))
@jrasanen
jrasanen / .vimrc
Created January 27, 2017 10:27 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
View .vimrc
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@jrasanen
jrasanen / TestPayment.py
Last active August 28, 2015 09:46 — forked from aydiv/TestPayment.py
Paypal Adaptive Payments - Python sample for parallel payment
View TestPayment.py
import urllib
import urlparse
import collections
import httplib
def TestPayment():
#Set our headers
headers = {
'X-PAYPAL-SECURITY-USERID': 'jb-us-seller_api1.paypal.com',
'X-PAYPAL-SECURITY-PASSWORD': 'WX4WTU3S8MY44S7F',
@jrasanen
jrasanen / 0_reuse_code.js
Created July 16, 2014 15:07
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console