Skip to content

Instantly share code, notes, and snippets.

View hayd1n's full-sized avatar
👀

Hayden Chang hayd1n

👀
View GitHub Profile
@askareija
askareija / INSTALL.md
Last active February 4, 2025 20:28
Install Ollama with AMD GPU (On Laptop) Arch Linux

My laptop specs: MSI Bravo 15 B7E

  • CPU: AMD Ryzen™ 5 7535HS Processor with AMD XDNA™ architecture 6 cores, Max Boost Clock 4.55 GHz
  • GPU: AMD Radeon™ RX 6550M 4GB GDDR6
  • RAM: 32GB DDR5-4800
  1. Clone ollama git clone --recursive https://github.com/ollama/ollama.git
  2. go to directory cd ollama
@cGandom
cGandom / RaspberryPi4-qemu.md
Last active April 18, 2025 16:06
Emulating Raspberry Pi 4 with Qemu

Emulating Raspberry Pi 4 with Qemu

Just a quick update before we dive in: what we're actually doing here is running Raspberry Pi OS (64-bit) on a QEMU virtual ARM setup. This isn't full-blown hardware emulation of the Raspberry Pi 4, but more about creating a virtual environment for the OS. It doesn't mimic all the specific hardware features of the Pi 4, but it's pretty useful and great for general testing. I turned to this solution mainly to extract a modified sysroot from the Raspberry Pi OS, something not readily available in other resources. For those looking into detailed emulation of the actual Raspberry Pi 4's hardware in QEMU, check out this link for the latest updates: https://gitlab.com/qemu-project/qemu/-/issues/1208.

Hope it helps! :D

Shortcomings: No GUI yet, only console.

Steps

@xxrjun
xxrjun / extend-lvm.md
Last active July 13, 2024 02:31
了解LVM並於Ubuntu擴充伺服器磁碟空間
@santaklouse
santaklouse / CrossOver.sh
Last active April 21, 2025 23:23
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@PierBover
PierBover / Example.svelte
Last active March 25, 2025 19:09
Keep alive Svelte action
<script>
import keepAlive from "./action.js";
import Component from './Component.svelte';
</script>
<div use:keepAlive={{id: 'some-manual-id', componentClass: Component}}/>
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active April 21, 2025 11:43 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@koshatul
koshatul / README.md
Last active March 12, 2025 06:09
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@wolph
wolph / hcsr04.ino
Created December 30, 2018 18:59
Simple arduino HC-SR04 (HCSR04) distance detection using interrupts for low latency measurements
#include <Arduino.h>
// Uses https://github.com/PaulStoffregen/TimerOne for sending on a regular interval
#include <TimerOne.h>
// ECHO pin, needs to be a pin that supports interrupts!
#define ULTRASONIC_PIN_INPUT 2
// TRIG pin, can be any output pin
#define ULTRASONIC_PIN_OUTPUT 3
// update interval, make sure to keep it above 20ms
#define ULTRASONIC_TIMER_US 50000