Skip to content

Instantly share code, notes, and snippets.

@julianfrank
julianfrank / gitInWSL2.sh
Created July 20, 2022 15:33
Making GIT work in wsl2
//Move all the certificated from windows .ssh (/mnt/c/Users/<username>/.ssh)folder to ~/ssh
sudo chmod 600 ~/.ssh/id_ed25519
sudo chmod 600 ~/.ssh/id_ed25519.pub
sudo chmod 644 ~/.ssh/known_hosts
sudo chmod 755 ~/.ssh
//git should wowrk now
@julianfrank
julianfrank / mouse.js
Created September 12, 2019 12:27
Mouse Pointer Tracker
window.addEventListener('mousemove', function(e) {
var x = (e.clientX / window.innerWidth * 2) - 1;
var y = (e.clientY / window.innerHeight * -2) + 1;
console.log(x,y)
// something awesome
});
@julianfrank
julianfrank / BasicComponent.js
Created September 5, 2019 12:24
WHS.js Tryout
import {
Mesh,
IcosahedronGeometry,
MeshBasicMaterial
} from 'three';
import { MeshComponent } from 'whs';
export class BasicComponent extends MeshComponent {
build() {
@julianfrank
julianfrank / babylonsample.js
Created September 2, 2019 09:30
babylonsample.js
<template>
<div id="phaserCanvas"></div>
</template>
<script>
export default {
data() {
return {
game: () => {}
@julianfrank
julianfrank / notes.md
Created August 30, 2019 05:43
js document load events capture

document.addEventListener("DOMContentLoaded", theDomHasLoaded, false); window.addEventListener("load", pageFullyLoaded, false);

function theDomHasLoaded(e) { // do something }

function pageFullyLoaded(e) { // do something again }

@julianfrank
julianfrank / pixijs.vue
Created August 22, 2019 08:50
pixijs Vue Component working :)
<template>
<div id="gl">
<div class="columns" style="position:absolute;top:10px;left:10px;z-index:1001;">
<div class="column">
<div class="button" @click="buttonClicked">Hello-{{count.button}}</div>
</div>
<div class="column">{{sysInfo.width}}x{{sysInfo.height}}</div>
<div class="column">{{sysInfo.lastKeyDown}}</div>
<div class="column">{{jfSpriteDir}}</div>
<div class="column">{{drag}}</div>
@julianfrank
julianfrank / matterjs.vue
Created August 22, 2019 08:49
Vue with MAtterJS in working condition
<template>
<div class="content">
<div id="testLabel">Testing</div>
<div id="drawhere"></div>
debug:{{JSON.stringify(debug)}}
</div>
</template>
<script>
import {
@julianfrank
julianfrank / pixijs.spritesheet
Created August 20, 2019 14:02
For working with pixijs spritesheet animations
/*sheet._frameKeys.map(t=>txs.push( PIXI.utils.TextureCache[t]))
console.log(txs)
let bird1 = new PIXI.AnimatedSprite(txs);
console.log(bird1)*/
@julianfrank
julianfrank / enableBootMessages.sh
Created June 8, 2019 09:54
shell to disable graphical boot in Pop OS
# simulate
sudo kernelstub -c -v -a "splash=false quiet=false"
# Actual command to deactivate graphical boot
sudo kernelstub -v -a "splash=false quiet=false"