Skip to content

Instantly share code, notes, and snippets.

View Fusseldieb's full-sized avatar
😼

Valentino Stillhardt Fusseldieb

😼
View GitHub Profile
@Fusseldieb
Fusseldieb / unlimited_trials_babeledit.txt
Last active March 25, 2024 08:26
Activate BabelEdit temporarily / Unlimited trial
/////////////////////////////////////////////////////////
As others have mentioned:
This workaround only works for versions 2.*
In other words: It's outdated and doesn't work anymore
Scroll down for community posts!
/////////////////////////////////////////////////////////
Original gist:
Obviously for educative purposes only.
@Fusseldieb
Fusseldieb / GPTQ-for-LLaMa-errorlog.txt
Created August 1, 2023 16:18
GPTQ-for-LLaMa error
(C:\Users\vstil\Downloads\oobabooga_windows\oobabooga_windows\installer_files\env) C:\Users\vstil\Downloads\oobabooga_windows\oobabooga_windows>pip install git+https://github.com/sterlind/GPTQ-for-LLaMa.git@lora_4bit
Collecting git+https://github.com/sterlind/GPTQ-for-LLaMa.git@lora_4bit
Cloning https://github.com/sterlind/GPTQ-for-LLaMa.git (to revision lora_4bit) to c:\users\vstil\downloads\oobabooga_windows\oobabooga_windows\installer_files\pip-req-build-179a4jdx
Running command git clone --filter=blob:none --quiet https://github.com/sterlind/GPTQ-for-LLaMa.git 'C:\Users\vstil\Downloads\oobabooga_windows\oobabooga_windows\installer_files\pip-req-build-179a4jdx'
Running command git checkout -b lora_4bit --track origin/lora_4bit
branch 'lora_4bit' set up to track 'origin/lora_4bit'.
Switched to a new branch 'lora_4bit'
Resolved https://github.com/sterlind/GPTQ-for-LLaMa.git to commit 8bfa7a4a35e72ae853722dbfd2e4d88afc736536
Preparing metadata (setup.py) ... done
Requirement already satisfied: t
@Fusseldieb
Fusseldieb / silent_fans.sh
Last active June 20, 2022 18:51
Making the computer cool and silent with the nbfc and cpupower package - Made for a 2017 MiBook running Manjaro
# Install nbfc and cpupower package first
# Run in crontab when computer starts
# Add this line to `sudo crontab -e`:
# @reboot /usr/bin/sh /home/<your_username>/silent_fans.sh
# And save this file in the same location (/home/<your_username>/silent_fans.sh)
# Restart and see if it works - If you're using a 2017 MiBook, it definitively should
# After the login, only one fan should spin very slowly, maintaining a constant active airflow cooling the computer
#
#I couldn't verify a decrease in battery runtime, it seems that it remains the same
# A theory of mine is that the computer uses more energy to idle the fans, get hot and then ramp up the fans to cool it back down, whereas maintaing it at low rpm prevents it from heating up in the first place.
@Fusseldieb
Fusseldieb / middle_button.ahk
Last active June 2, 2022 15:06
This snippet uses AutoHotKey (AHK) to hold the middle mouse button down using the "AppsKey" (Usually right lower "context menu" key). Useful for CAD applications like SolidWorks and similar on laptops
Holding = 0
AppsKey::
Loop {
if(!GetKeyState("AppsKey", "P")) {
break
}
if(Holding = 0) {
Send {MButton down}
Holding = 1
}
// Snippet for Directus' custom endpoint (tested on v9.8.0)
// This snippet checks if a role named "Homepage" is present and authenticates with it to execute custom logic
// In this case, it returns an image if the role has sufficient permissions.
// It's pretty barebone, but should get you started.
const { getPermissions } = require('directus/utils/get-permissions');
const { getSchema } = require('directus/utils/get-schema');
module.exports = function registerEndpoint(router, { services, exceptions, database }) {
// Snippet for Directus' custom endpoint (tested on v9.8.0)
// This snippet checks if a role named "Homepage" is present and authenticates with it to execute custom logic
// In this case, it returns *all* items inside "products" where "visible_on_homepage" is set to true.
const { getPermissions } = require('directus/utils/get-permissions');
const { getSchema } = require('directus/utils/get-schema');
module.exports = function registerEndpoint(router, { services, exceptions, database }) {
router.get('/products', async (req, res, next) => {
const { ItemsService } = services;
@Fusseldieb
Fusseldieb / select2-custom.vue
Last active March 23, 2022 03:19
A custom select2 component which is ready to be used
<!--
Access it with: <select2 v-model="field.value" :options="field.options" :tags="true"></select2>
A object exists with following structure:
field: {
value: "",
options: [
{ id: "0", text: "No" },
{ id: "5", text: "5 mm" },
{ id: "10", text: "10 mm" }
@Fusseldieb
Fusseldieb / irsamsung.h
Last active February 4, 2021 03:08
IRremoteESP8266 for ESPHome with LED "sync" pin
// This version of the code allows you to use an INPUT pin to sync the state of your HVAC with ESPHome
// This is particularly useful if you have integrated an ESP8266 inside your HVAC and hooked up the ON-LED from it to the ESP8266
// That way even if someone turns the HVAC on with the remote control, Home Assistant should show the ACTUAL state of it (ON/OFF).
#include "esphome.h"
#include "IRremoteESP8266.h"
#include "IRsend.h"
#include "ir_Samsung.h"
const uint16_t kIrLed = D8; // IR LED (OUTPUT) PIN