Skip to content

Instantly share code, notes, and snippets.

@Vbitz
Vbitz / run.sh
Created December 15, 2023 02:39
Glasgow script capable of reading and writing to SD Cards.
#!/bin/bash
# SS_EEPROM (Chip Select) Pin 2
# 3.3v -
# MISO (CIPO) Pin 0
# SCK (SCK) Pin 3
# GND -
# MOSI (COPI) Pin 1
set -x
@tos-kamiya
tos-kamiya / ai-howdoi
Last active September 2, 2024 15:22
howdoi command with leverage of Phind-CodeLlama
#!/usr/bin/env python3
# ref: https://stackoverflow.com/questions/2804543/read-subprocess-stdout-line-by-line#2813530
import io
import os
import subprocess
import sys
from pygments import highlight
@tos-kamiya
tos-kamiya / trans_nllb.py
Created September 27, 2023 19:59
A command-line translator using Facebook's NLLB LLM (proof of concept)
# ref https://zenn.dev/syoyo/articles/9a159ee747835a
import sys
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
max_length = 512
# ref https://huggingface.co/facebook/nllb-200-distilled-1.3B
# The model was trained with input lengths not exceeding 512 tokens, therefore translating longer sequences might result in quality degradation.
@danielchc
danielchc / docker-emby-bypass.md
Last active October 29, 2024 22:14
Emby Premiere: ByPass Docker container

Emby Premiere ByPass Docker container

❗ All the information provided on this tutorial are for educational purposes only. I'm not responsible for any misuse of this information. If you like the app buy it

Table of Contents

Обращение к российским IT-специалистам

Коллеги! Армия Путина вторглась в Украину под предлогом «денацификации» и ведёт там грязную войну. У многих из нас есть коллеги из Украины, с которыми можно пообщаться и убедиться в том, что никакого «освобождения» от Путина им не нужно.

Многим из нас сейчас страшно. Но открытое письмо нашей индустрии против этой войны собрало уже более 30 000 подписей. Нас много, и мы уверены, что это не предел.

Правительству тоже страшно: страшно потерять нас. А значит, действия каждого из нас могут помочь прекратить это безумие.

Что делать

@ymoslem
ymoslem / M2M-100-example.py
Last active September 1, 2024 13:23
Example of translating a file with M2M-100 using CTranslate2
# This example uses M2M-100 models converted to the CTranslate2 format.
# Download CTranslate2 models:
# • M2M-100 418M-parameter model: https://bit.ly/33fM1AO
# • M2M-100 1.2B-parameter model: https://bit.ly/3GYiaed
import ctranslate2
import sentencepiece as spm
@akihikodaki
akihikodaki / README.en.md
Last active October 28, 2024 15:20
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@FreddieOliveira
FreddieOliveira / docker.md
Last active November 4, 2024 08:28
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

apiVersion: v1
kind: Secret
metadata:
name: ceph-admin-secret
namespace: kube-system
type: "kubernetes.io/rbd"
data:
# ceph auth get-key client.admin | base64
key: <your output from above>
@en4rab
en4rab / WiFi-Lightbulb.md
Last active October 25, 2024 06:56
Flashing an unbranded smart lightbulb to Tasmota

Flashing an unbranded smart lightbulb to Tasmota

Whilst on holiday last week I thought i would do something productive but that seemed like work so I bought some cheap noname wi-fi smart LED lighbulbs off ebay and flashed them with Tasmota firmware, since the particular bulb I bought wasnt listed on the Tasmota Device Templates Repository and I have no idea if they accept an entry for a bulb with no identifying marks I thought i'd put something here incase its of use to anyone.

Reliability: I have at this point had 10 of these bulbs running for about a week, one of them has just died.

TL;DR

The pinout and device string for this light:

  • GPIO4 Cold White PWM 4