Skip to content

Instantly share code, notes, and snippets.

Martin Splitt AVGP

Block or report user

Report or block AVGP

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AVGP
AVGP / dms.xml
Last active Jan 15, 2019
UPnP test server (incomplete)
View dms.xml
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<dlna:X_DLNADOC>DMR-1.50</dlna:X_DLNADOC>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>YoloCast</friendlyName>
@AVGP
AVGP / index.html
Created Dec 3, 2018
Stupidest, simplest JS web app ever
View index.html
<!doctype html>
<html lang="en">
<head>
<title>Kitten Corner</title>
<meta charset="utf-8">
<meta name="description" content="Kitten Corner has a bunch of lovely cat pictures ready for you!">
<meta name="viewport" content="width=device-width">
<style>
body {
@AVGP
AVGP / test.html
Created Sep 25, 2018
Tests for prerendering of structured data
View test.html
<!doctype html>
<html>
<body>
<h1>Rendered using JavaScript:</h1>
<p></p>
<!-- JavaScript - should be removed by the prerendering -->
<script>
const paragraph = document.querySelector('p');
paragraph.textContent = "Hello, World!";
</script>
@AVGP
AVGP / polymer-playground-app.html
Created May 28, 2018
A polymer 2 component using iron-ajax to load some data
View polymer-playground-app.html
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
<dom-module id="polymer-playground-app">
<template>
<iron-ajax auto url="https://jsonplaceholder.typicode.com/posts/1" handle-as="json" last-response="{{post}}"></iron-ajax>
<p>[[post.title]]</p>
</template>
<script>
View x86-gnu-assembly-primer.md

A primer on x86 assembly with GNU assembler

When it comes to assembly language, it isn't as hard as many people think. Fundamentally, you write short, human-readable commands for the processor to execute (your assembly code) and then use a tool (the actual assembler) to translate your code into machine-readable binary instructions. Unlike high-level languages, assembly language is very simple and doesn't have that many features. The difficulty is to deal with memory and build more complex flows (e.g. loops or I/O) from the simple primitives that the assembly language gives you.

Registers and instructions

CPUs usually have small, very fast storage available for the data that is used in its instructions. This kind of storage is much smaller but also much faster than the RAM and is called registers. An x86 processor has a bunch of them to store generic data, manage the stack, keep track of the current instruction and other administrative inform

@AVGP
AVGP / materials.txt
Created Feb 19, 2018
List of predefined Archilogic materials
View materials.txt
basic-floor
basic-balcony
basic-wall
basic-ceiling
wood_parquet_oak
wood_parquet_4
wood_parquet_oak_stained
wood_parquet_oak_dark
wood_parquet_oak_black
floor_oak_parquet
View uname-hook.c
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/unistd.h>
#include <linux/utsname.h>
#define MEM_READONLY 0x10000 // bit 16 in cr0 specifies if "readonly" memory is protected
// we define a type for the original uname syscall handler function
typedef asmlinkage long (*orig_uname_t)(struct new_utsname *);
@AVGP
AVGP / index.html
Created Nov 6, 2017
Hosting Data3D in Aframe
View index.html
<!doctype html>
<html>
<head>
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<script src="https://dist.3d.io/3dio-js/1.x.x/3dio.min.js"></script>
</head>
<body>
<a-scene>
<a-entity position="0 0 -2" io3d-data3d="url:untitled.gz.data3d.buffer"></a-entity>
</a-scene>
@AVGP
AVGP / wat.js
Created Sep 6, 2017
ffmpeg.js converting webm from a media recorder into mp4
View wat.js
var ffmpeg = require('ffmpeg.js/ffmpeg-mp4.js')
document.querySelector('button').addEventListener('click', (evt) => {
document.querySelector('[camera]').setAttribute('animation', {
property: 'rotation',
to: '0 360 0',
dur: 10000,
easing: 'linear'
})
You can’t perform that action at this time.