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 / all.sh
Last active July 14, 2024 13:03
Clone all repos of a GitHub organization
curl -s https://api.github.com/orgs/bifravst/repos\?per_page\=200 | jq '.[] | select( .archived == false).clone_url' -r | xargs -I@ git clone --depth 1 @
@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 / 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 / coin-changer.spec.ts
Created August 25, 2023 13:12
Aki Salmi SoCraTes 2023 - Test Any Unit
import { assertEquals } from "https://deno.land/[email protected]/assert/mod.ts";
import {
assertSpyCall,
spy,
} from "https://deno.land/[email protected]/testing/mock.ts";
Deno.test("coin changer", () => {
assertEquals(coinChanger(200), [200]);
});
@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 / 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;