Skip to content

Instantly share code, notes, and snippets.

View leyyce's full-sized avatar
📓
Studying

Leya Wehner leyyce

📓
Studying
View GitHub Profile
@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() {
@leyyce
leyyce / client.go
Last active August 10, 2020 21:18
[Go] Simple example of how to use sockets for a basic, multithreaded, TCP based client-server communication.
package main
import (
"bufio"
"fmt"
"net"
"os"
"strings"
)
@leyyce
leyyce / Main.java
Last active November 22, 2019 23:34
Bruch als Objekt
public class Main {
public static void main(String[] args) {
Bruch b = null;
Bruch b2 = null;
try {
b = new Bruch(18,36);
b2 = new Bruch(13, 24);
}
@leyyce
leyyce / fischer-yates.cs
Last active October 13, 2019 12:25
C# Implementation of the Fischer-Yates shuffle
using System;
namespace Fisher_Yates_shuffle
{
class Program
{
static void Main(string[] args)
{
// Generate a set of numbers from user input...
Console.Write("Enter count of numbers to shuffle: ");
@leyyce
leyyce / main.py
Last active September 17, 2019 13:15
Student Credits Management
from student_register import StudentRegister
from student import Student
def main():
register = StudentRegister("Bachelor CS 2019")
napoleon = Student('Napoleon', 1, 20)
snowball = Student('Snowball', 2, 22)
squealer = Student('Squealer', 3, 19)