Skip to content

Instantly share code, notes, and snippets.

View werpu's full-sized avatar
🏠
Working from home

Werner Punz werpu

🏠
Working from home
  • Irian GmbH
  • Linz, Austria
View GitHub Profile
import asyncio
stop_var = False
async def task2():
while not stop_var:
print("task2")
await asyncio.sleep(1)
<script>
import {onMount} from 'svelte'
import {layerStore} from "./componentStores.js"
export let id;
export let l1_code;
export let l1_value;
export let l2_code;
export let l2_value;
import {saveResolve} from "../shared/utils.js";
class ShiftKey extends HTMLElement {
static EVT_LAYERCHANGE = "layerchange";
observedAttrs = ["l1-code",
"l1-value",
"l2-code",
"l2-value",
class ShiftKey extends HTMLElement {
observedAttrs = ["l1_code",
"l1_d_value",
"l2_code",
"l2_d_value",
"l3_code",
"l3_d_value",
"l4_code",
"l4_d_value",
TagBuilder.withTagName("x-navigation")
.withMarkup("<button id='nav_c64' data-target='c64'>C64</button><button id='atari5200' data-target='atari5200'>Atari 5200</button><button id='coleco-1p' data-target='coleco-1p'>Colecovision</button>")
.withConnectedCallback(function () {
DomQuery.querySelectorAll("x-navigation button").addEventListener("click", (evt) => {
let target = evt.target.dataset["target"];
location.href = target + '.html';
}).each((item => {
item.removeClass("hidden");
if (item.attr("data-target").value == DomQuery.byId(this).attr("selected").value) {
item.addClass("hidden");
TagBuilder.withTagName("x-navigation")
.withMarkup("<button id='nav_c64' data-target='c64'>C64</button><button id='atari5200' data-target='atari5200'>Atari 5200</button><button id='coleco-1p' data-target='coleco-1p'>Colecovision</button>")
.withConnectedCallback(function () {
DomQuery.querySelectorAll("x-navigation button").addEventListener("click", (evt) => {
let target = evt.target.dataset["target"];
location.href = target + '.html';
}).each((item => {
item.removeClass("hidden");
if (item.attr("data-target").value == DomQuery.byId(this).attr("selected").value) {
item.addClass("hidden");
/* MIT License
#
# Copyright (c) 2019 Werner Punz
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
/* MIT License
#
# Copyright (c) 2019 Werner Punz
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
(function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=13)}([function(t,e,n){"use strict";Object.defineProperty(e,"__e