Skip to content

Instantly share code, notes, and snippets.

View ZoolWay's full-sized avatar

Ricky Blankenaufulland ZoolWay

View GitHub Profile
using System;
using System.Runtime.InteropServices;
// ReSharper disable SuspiciousTypeConversion.Global
// ReSharper disable InconsistentNaming
namespace VideoPlayerController
{
/// <summary>
/// Controls audio using the Windows CoreAudio API
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer
@ZoolWay
ZoolWay / settings.json
Created October 12, 2020 13:05
Windows Terminal configuration
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@ZoolWay
ZoolWay / tamper-xpath.js
Created August 28, 2020 07:07
Tampermonkey, XPath parser function for javascript console
// ==UserScript==
// @name ricky_xpath
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*/*
// @match http://*/*
// @grant none
// ==/UserScript==
@ZoolWay
ZoolWay / ssh-agent.sh
Created May 25, 2020 06:12
Clean and singleton startup of ssh-agent in WSL (add to .bashrc e.g.)
if ! pgrep ssh-agent > /dev/null; then
rm -f /tmp/ssh-auth-sock
eval "$(ssh-agent -s -a /tmp/ssh-auth-sock)"
ssh-add /mnt/c/Users/Admin/.ssh/compax-gitlab
else
export SSH_AUTH_SOCK=/tmp/ssh-auth-sock
fi
@ZoolWay
ZoolWay / gist:2c46bc62cea0e6a311c1e8d1bdca2eba
Created May 25, 2020 06:10
Bash Aliases to run over multiple working copies
gitall() {
find . -mindepth 2 -maxdepth 2 -name .git -type d -execdir echo \; -execdir pwd \; -execdir git $1 \;
}
mvnall() {
find . -mindepth 2 -maxdepth 2 -name pom.xml -type f -execdir echo \; -execdir pwd \; -execdir mvn $1 \;
}
@ZoolWay
ZoolWay / minicode.ts
Created April 29, 2020 16:45
Minimal typescript to show some problems wioth aws-iot-device-sdk-v2
import { mqtt, io, iot } from 'aws-crt';
import express = require('express');
const config = {
"keyPath": "config/abcd-private.pem.key",
"certPath": "config/abcd-certificate.pem.crt",
"caPath": "config/AmazonRootCA3.pem",
"clientId": "my-client-id",
"topic": "my-topic",
"endpoint": "xyz-ats.iot.eu-west-1.amazonaws.com"
@ZoolWay
ZoolWay / app.html
Last active August 18, 2017 14:42
Getting view model of containerless custom element
<template>
<require from="norm-comp"></require>
<require from="less-comp"></require>
<require from="list-comp"></require>
<h1>Getting view model of containerless custom element</h1>
<list-comp>
<norm-comp text="item one, normal"></norm-comp>
<norm-comp text="item two, normal"></norm-comp>
@ZoolWay
ZoolWay / app.html
Last active July 7, 2017 13:44
Aurelia I18N update-value
<template>
<require from="my-comp"></require>
<h1>Aurelia I18N update-value</h1>
<my-comp title="simple"></my-comp>
<p>${'client:title' & t}</p>
</template>
@ZoolWay
ZoolWay / app.html
Last active June 23, 2017 11:27
Aurelia Binding ES6 Map
<template>
<h1>Aurelia Debounce</h1>
<div ref="areaContainer">
<h2>Textbox:</h2>
<div style="border:1px solid blue; padding: 1em; margin: 1em;">
<input value.bind="myMap['masterkey']" placeholder="type here" />
</div>
@ZoolWay
ZoolWay / app.html
Last active May 30, 2017 07:36
Aurelia KeyUp
<template>
<h1>Aurelia KeyUp/Down</h1>
<div>
<h2>KeyUp:</h2>
<div style="border:1px solid blue; padding: 1em; margin: 1em;" keyup.delegate="handleKeyUp($event)">
<input value.bind="myText & debounce:800" placeholder="type here" />
</div>