Skip to content

Instantly share code, notes, and snippets.

@nerestaren
nerestaren / alphamap.js
Created March 21, 2018 10:40
A-FRAME Alpha Map
// This component adds an alpha map to a mesh.
AFRAME.registerComponent('alpha-map', {
schema: {
src: {type: 'map'}
},
init: function() {
this.el.sceneEl.systems.material.loadTexture(this.data.src, {src: this.data.src}, this.callback.bind(this));
},
callback: function(texture) {
osmc@osmc:~$ ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
ether b8:27:eb:5d:57:a4 txqueuelen 1000 (Ethernet)
RX packets 400632 bytes 519837935 (495.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25314 bytes 1575366 (1.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
@nerestaren
nerestaren / keyboard.ahk
Created July 13, 2024 18:09
Volume control
#Requires AutoHotkey v2.0
#SingleInstance Force
#Include TextRender.ahk
#Include StdOutToVar.ahk
DetectHiddenWindows True
; Changing volume and muting requires https://www.nirsoft.net/utils/sound_volume_command_line.html
; Changing audio device requires https://github.com/frgnca/AudioDeviceCmdlets
; Using TextRender.ahk from https://github.com/iseahound/TextRender