Skip to content

Instantly share code, notes, and snippets.

View coderbyheart's full-sized avatar
🌩️
building serverless IoT solutions

Markus Tacker coderbyheart

🌩️
building serverless IoT solutions
View GitHub Profile
@coderbyheart
coderbyheart / aws-iot-encode-binary.md
Created April 25, 2024 10:35
Encoding binary in AWS IoT Shadow

Meta data

{
  "myBinaryPayload": "7483c2f64e8f085b",
  "myBinaryPayload:coap-content-format": 42
}

Encode as object

@coderbyheart
coderbyheart / README.md
Last active April 8, 2024 08:37
Broken ESM Lambda when folder exists with same name as handler module

When a lambda is authored with this structure:

acme.js
acme/lib.js

and the acme.js imports from acme/lib.js it breaks:

@coderbyheart
coderbyheart / notes.txt
Created April 2, 2024 15:18
FroGSConf 23 March 2024 - How to find employers that value quality (and you)?
Who is interviewing you? Do you talk to the people you'd be working with everyday?
Does someone else you know have insider information before a formal interview?
Why do you need this role? How is this competency covered in the org at the moment?
What is the current mindset of the team?
How is a team formed? Do we all win together?
What's the salary like?
What are people's typical hours? What is it like when you get close to a deadline?
Check out Glassdoor reviews (but keep in mind it can be anecdotal)
What's difficult about the current situation?
Are you expected to be in the office, have your camera on?
@coderbyheart
coderbyheart / fetch.js
Last active March 7, 2024 11:41
Kartverket API for vasstandsdata
import { xml2json } from "xml-js";
const station = async ({ latitude, longitude }) => {
const req = `https://api.sehavniva.no/tideapi.php?${new URLSearchParams({
lat: latitude,
lon: longitude,
datatype: "obs",
refcode: "cd",
interval: 60,
dst: 0,
@coderbyheart
coderbyheart / abstract.md
Last active February 22, 2024 16:25
The Synergistic Symphony: How Blockchain and AI Will Orchestrate a Global Renaissance

The Synergistic Symphony: How Blockchain and AI Will Orchestrate a Global Renaissance

In today's increasingly interconnected and complex world, we face unprecedented challenges. From climate change and resource scarcity to social inequality and political turmoil, the very fabric of our society is being tested. In this transformative talk, we will embark on an enlightening journey to explore the revolutionary potential of a powerful synergy: the convergence of blockchain and artificial intelligence.

This deep dive will delve into the unique strengths of each technology. We will examine how blockchain's inherent transparency, immutability, and security can foster trust and accountability in critical systems, while AI's unparalleled analytical and decision-making capabilities can unlock new avenues for efficiency, optimization, and innovation. By harnessing the power of this dynamic duo, we can pave the way for a brighter future.

Join us as we explore how this synergistic symphony can be leveraged to:

  • **
@coderbyheart
coderbyheart / readme.md
Last active February 3, 2024 20:07
QL-720NW

QL-720NW printing with Arch Linux (32-Bit)

brother-ql720nw-lpr

PKGBUILD

# Maintainer:  Markus Tacker <m@cto.hiv>
# Based on the QL-700 PKGBUILD -> Jacob Alexander <triplehaata@gmail.com>
pkgname=brother-ql720nw-lpr

pkgver=1.0.1

@coderbyheart
coderbyheart / UDP.py
Created January 22, 2024 16:44
Nordic developer academy UDP echo server implementation
#!/usr/bin/env python3
import os
from _thread import *
import socket
import datetime
localIP = "0.0.0.0"
localPort = 2444
bufferSize = 1024
@coderbyheart
coderbyheart / delete-tweets.spec.ts
Last active August 26, 2023 06:25
Clean Twitter Account with Playwright
import { test } from "@playwright/test";
import { appendFile, readFile } from "fs/promises";
const username = "coderbyheart";
const password = "xxx";
test("remove old tweets", async ({ page }) => {
await page.goto("https://twitter.com/");
await page.getByTestId("loginButton").click();
await page.getByLabel("Phone, email, or username").fill(username);
@coderbyheart
coderbyheart / coin-changer.spec.ts
Created August 25, 2023 13:12
Aki Salmi SoCraTes 2023 - Test Any Unit
import { assertEquals } from "https://deno.land/std@0.200.0/assert/mod.ts";
import {
assertSpyCall,
spy,
} from "https://deno.land/std@0.200.0/testing/mock.ts";
Deno.test("coin changer", () => {
assertEquals(coinChanger(200), [200]);
});
@coderbyheart
coderbyheart / Code.gs
Created August 10, 2023 15:14
Codefreeze registration form
var POST_URL = "https://api.github.com/repos/codefreezefi/codefreeze.fi/issues";
var GH_TOKEN = 'ghp_XXX'; // should have public_repo permission
function parseResponses(responses) {
var items = [];
for (var i = 0; i < responses.length; i++) {
var response = responses[i];
var question = response.question;
var answer = response.answer;
var parts;