Skip to content

Instantly share code, notes, and snippets.

@ngxson
ngxson / FAQ.md
Last active April 28, 2025 17:01
convert ARM NEON to WASM SIMD prompt

Why did you do this?

Relax, I only have one Sunday to work on idea, literally my weekend project. So I tried Deepseek to see if it can help. Surprisingly, it works and it saves me another weekend...

What is your setup?

Just chat.deepseek.com (cost = free) with prompts adapted from this gist.

Does it work in one-shot or I have to prompt it multiple times?

@RubenKelevra
RubenKelevra / fast_firefox.md
Last active May 8, 2025 16:01
Make Firefox fast again
@kbumsik
kbumsik / Dropbox-for-FreeNAS-SCALE.md
Last active January 21, 2025 23:49
Native Dropbox client for FreeNAS SCALE

Native Dropbox client service for TrueNAS SCALE

Although FreeNAS (TrueNAS) does support Dropbox backup, it is not the official Dropbox client that offers native and almost-real-time syncing.

Their new project, TrueNAS SCALE, is the Linux version of FreeNAS. Since it is Linux Debian OS rather than FreeBSD, you now can run any Linux programs like the official Dropbox client.

This guide is intended to learn how to run the official headless Dropbox daemon on bootup.

Install Dropbox daemon

@kesyog
kesyog / embedded-rust-notes.md
Last active January 27, 2021 21:24
Rust embedded notes

Rust embedded notes

A place to jot down useful notes. Most if not all of this was lifted from the linked references, but I'm copying some of the highlights down here for my own reference.

Glossary

  • peripheral access crate (PAC): device crate (e.g. stm32f4) created using the svd2rust crate that presents an API to access a particular microcontroller's registers
  • hardware abstraction library (HAL) crate: higher-level abstraction on top of the PAC. This follows
@Th3Whit3Wolf
Th3Whit3Wolf / arch_sec_install.sh
Last active February 22, 2025 10:47
Install arch on btrfs(w/ swapfile) on luks with rEFInd bootloader
#!/bin/bash
# 0 - SSH
# This isn't necessary but if you ssh into the computer all the other steps are copy and paste
# Set a password for root
passwd
# Get network access
iwctl
"""
@aurorabbit
aurorabbit / README.md
Created April 2, 2018 07:14
iPhone favourite sync

Sync your favourited photos from your iOS device

Dependencies

brew.sh

brew install libimobiledevice
brew cask install osxfuse
brew install ifuse
@cryzed
cryzed / fix-infinality.md
Last active March 20, 2025 13:16
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@Hylian
Hylian / acsl_rummy.py
Last active January 13, 2020 15:12
my greatest creation
from itertools import *
from operator import *
convertValue, convertHouse = {'A': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13}, {'D': 0, 'C': 1, 'H': 2, 'S': 3}
def addcard(n, h):
if len(h) <= 1 and filter(lambda x: x[0] != 0, h) == 0: h.append((0, n))
else:
for c in h:
if c[0] == 2 and c[1][0][1] == n[1] and (convertValue[c[1][0][0]] == convertValue[n[0]]+1 or convertValue[c[1][2][0]] == convertValue[n[0]]-1):
h.append((3, c[1] + [n]))
h.remove(c)
@sardemff7
sardemff7 / pinentry-rofi.rb
Last active April 6, 2025 20:16
Pinentry rofi-based bare implementation
#! /usr/bin/env ruby
# Copyright © 2016 Quentin "Sardem FF7" Glidic
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@kadamski
kadamski / sds011
Last active March 31, 2024 02:03
SDS011 dust sensor reading
#!/usr/bin/python
# coding=utf-8
# "DATASHEET": http://cl.ly/ekot
from __future__ import print_function
import serial, struct, sys, time
DEBUG = 1
CMD_MODE = 2
CMD_QUERY_DATA = 4
CMD_DEVICE_ID = 5