Skip to content

Instantly share code, notes, and snippets.

View leyyce's full-sized avatar
🩷

Leya Wehner leyyce

🩷
View GitHub Profile
@leyyce
leyyce / list_optional_deps.fish
Last active February 26, 2025 17:29
[bash/fish] pacman: List optional dependencies for all installed packages
function list_optional_deps
for pkg in (pacman -Qeq)
set -l deps (pacman -Qi $pkg | awk '
BEGIN {flag=0}
/^Optional Deps/ {
flag=1;
sub(/^[^:]+:[ \t]*/, "");
print;
next
}
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
#include <errno.h>
#include <sys/select.h>
#define NUM_JOBS 3
sudo modprobe i2c-stub chip_addr=0x10
echo monitoring_system 0x10 | sudo tee /sys/bus/i2c/devices/i2c-1/new_device
echo 'file drivers/i2c/* +p' | sudo tee /sys/kernel/debug/dynamic_debug/control
#include <linux/limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define READ_BUFFER_SIZE 1024
#define BASE_PATH "/proc/"
#define CMDLINE "cmdline"
#define BASE_PATH_FORMAT BASE_PATH "%s"
@leyyce
leyyce / main.asm
Last active May 15, 2024 17:25
LED-Blink AVR Assembly
;
; Blink.asm
;
; Created: 03/05/2024 19:59:06
; Author : Leya Wehner
;
; Output pin that the LED is connected to (Port D)
.equ output_bit = 2
@leyyce
leyyce / main.c
Created December 12, 2023 13:50
IoT-Uebung4
#include <stdbool.h>
#include "esp_event.h"
#include "esp_wifi.h"
#include "esp_err.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "esp_http_client.h"
#define ESP_WIFI_SSID "LV-PK"
#define ESP_WIFI_PASS "wlMDsvlVKr6aAc0cQS"
@leyyce
leyyce / main.c
Last active November 21, 2023 17:11
IoT_Ubung3
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/i2c.h"
#include "sdkconfig.h"
#include <math.h>
#define I2C_MASTER_PORT I2C_NUM_0
#define I2C_MASTER_SDA_IO 21
#define I2C_MASTER_SCL_IO 22
#define I2C_MASTER_FREQ_HZ 400000
@leyyce
leyyce / main.c
Last active November 20, 2023 21:09
IoT_Uebung2
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/uart.h"
#include "driver/gpio.h"
#include "sdkconfig.h"
#include <limits.h>
#define STACK_SIZE 1024 * 2
#define GPIO_LED_ONBOARD 5
options {
LOOKAHEAD = 1;
CHOICE_AMBIGUITY_CHECK = 2;
OTHER_AMBIGUITY_CHECK = 1;
STATIC = true;
DEBUG_PARSER = false;
DEBUG_LOOKAHEAD = false;
DEBUG_TOKEN_MANAGER = false;
ERROR_REPORTING = true;
JAVA_UNICODE_ESCAPE = false;
@leyyce
leyyce / lock.sh
Last active January 22, 2021 01:53
Simple blur lock screen that works with i3lock, xsslock, scrot and ImageMagick
#!/bin/bash
## CONFIGURATION ##############################################################
# Options to pass to i3lock
i3lock_options="-d"
TMPBG=/tmp/screen.png
MUTED=""
# Run before starting the locker
pre_lock() {