Skip to content

Instantly share code, notes, and snippets.

View Kaapiii's full-sized avatar

Markus Liechti Kaapiii

  • Payrexx AG
  • Switzerland
View GitHub Profile
@Kaapiii
Kaapiii / example-concat.js
Created February 7, 2024 07:47
Example of concatenating multiple nested objects with template literals in JavaScript.
row = {
"id": 2,
"name": "Erde",
"diameterKm": 12756,
"gravitation": 9.81,
"terrain": "Dschungel, Grasland, Berge, Wüste",
"populationCount": 8000000,
"prominentPeople": [
{
"name": "Rose Imaginär",
@Kaapiii
Kaapiii / Fooocus_Linux_AMD_Radeon_Installation_Instructions.md
Last active December 6, 2023 20:43
Use Fooocus with AMD Radeon 7900 XT / 7900 XTX on Ubuntu 22.04 LTS

Use Fooocus with AMD Radeon 7900 XT / 7900 XTX on Ubuntu 22.04 LTS

This document contains the setup instructions for running the image-generating software Fooocus with AMD GPUs on Ubuntu 22.04 LTS. The original instructions are scattered in different places, and it was a pain to find all the required pieces and configure them correctly. So here is a guide.

TOC

  1. Prerequisites
  2. Install ROCm Drivers
<?php
/**
* --------------------------------------------------------------
* Programming exercises datatypes & logical operators function
* --------------------------------------------------------------
*
* Task: solve all tasks by using one of the four loop types. The same loop type can be used for all functions.
*
* Execute file: "php -f basice_exercises.php"
@Kaapiii
Kaapiii / Readme.md
Last active November 2, 2021 08:17
Install PHP, Node on Win10

Install Basic PHP Environment On Windows 10

Install chocolatey

Download and install chocolatey download

Install software with choco

Open a terminal with Administrator privileges.

choco install php -y
@Kaapiii
Kaapiii / array_exercises.php
Last active December 19, 2022 12:47
PHP exercises with arrays
<?php
/**
* --------------------------------------------------------------
* Programming exercises arrays and loops
* --------------------------------------------------------------
* source: https://gist.github.com/Kaapiii/b78116341de9fcd16a62792945c11537
*
* Task: solve all tasks by using one of the four loop types. The same loop type can be used for all functions.
*
@Kaapiii
Kaapiii / Bootstrap.java
Last active November 25, 2020 10:45
Java Traits
import io.liechti.traittest.Kreis;
public class Bootstrap {
public static void main(String[] args)
{
init();
}
protected static void init()
@Kaapiii
Kaapiii / Instruction.md
Last active May 10, 2024 02:39
Ubuntu 20.04/20.10 Install TLP for Lenovo ThinkPad

Installation Instruction for TLP for Lenovo ThinkPads

Install & Start TLP & Check System Status

sudo apt install tlp tlp-rdw
sudo tlp start
sudo tlp-stat -s

Check status of battery features with

@Kaapiii
Kaapiii / blinking_led_pi4_32bit.s
Last active July 13, 2022 20:33
Blinking LED - Assembly - Raspberry Pi4
//.section .init
//=====================================
// LED Blink -frist try
// Markus Liechti
//
// For Raspberry Pi 4
// BCM2711 (Cortex-A72 / ARM-V8)
//=====================================
@Kaapiii
Kaapiii / 1_README.md
Last active November 10, 2023 00:38
Example Raspberry Pi - Ubuntu 20.04 LTS - Fixed IP

Installation

Preparation

  • Ubuntu 20.04 LTS image for Rasperry Pi4(64bit/32bit), Pi3(64bit/32bit), Pi2(32bit)
    Recommendation: 32bit image (Why? There are way more resources (toutorials, documentation) on the internet for 32bit issues. )
  • BaleanaEtcher
  • SD-Card less than 32GB (-> FAT)

Flash SD-Card

@Kaapiii
Kaapiii / command-fix.md
Created August 4, 2020 13:33
PHPStorm mysqldump throws errors while dumping a database on MySQL server version >= 5.7.31

Fix errors while executing mysqldump (with PhpStorm) on a database running on MySQL 5.7.31 and above.

(Dump worked seamlessly with mysql version 5.7.30)

Errors

  • mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
  • mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'concrete5com' AND TABLE_NAME = 'AreaLayoutColumns';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)

Fix

Fix the errors by adding the two following flags to the mysqldump command in PhpStorm