Skip to content

Instantly share code, notes, and snippets.

View KillerCodeMonkey's full-sized avatar
🐒

Bengt Weiße KillerCodeMonkey

🐒
View GitHub Profile
@KillerCodeMonkey
KillerCodeMonkey / apollo-local-link.ts
Created March 13, 2019 15:00
To run apollo client against a local schema
@KillerCodeMonkey
KillerCodeMonkey / jpeg-exif-image-orientation-js
Created June 28, 2019 05:41
JS script to detect jpeg orientation from exif data using filereader api
var orientation = function (file, callback) {
var fileReader = new FileReader();
fileReader.onloadend = function () {
var base64img = "data:" + file.type + ";base64," + _arrayBufferToBase64(fileReader.result);
var scanner = new DataView(fileReader.result);
var idx = 0;
var value = 1; // Non-rotated is the default
if (fileReader.result.length < 2 || scanner.getUint16(idx) != 0xFFD8) {
// Not a JPEG
if (callback) {
### Keybase proof
I hereby claim:
* I am killercodemonkey on github.
* I am bengtler (https://keybase.io/bengtler) on keybase.
* I have a public key ASAseeSfbCZ1S1Lopmz-jlW7pQiWwsgPA08iTdxvNrbNGwo
To claim this, I am signing this object:
@KillerCodeMonkey
KillerCodeMonkey / index.html
Last active October 1, 2025 13:11
electron-38.2.0-ubuntu-wayland-inactive-window-menu-bug
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>