Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -eu
if [ $# -gt 0 ]; then
BASE_DIR="$(readlink -e "${1}")"; shift
else
BASE_DIR="$(readlink -e .)";
fi
if [ $# -gt 0 ]; then
(
@attie
attie / Makefile
Created December 9, 2019 00:08
Make release, for microcontroller projects
VERSION_SHORT:=$(shell git describe --dirty=+ 2>/dev/null || echo "unknown")
release: main.hex
tar -caf $(PROJECT_NAME)_binary_$(VERSION_SHORT).tgz --xform 's!^!$(PROJECT_NAME)_$(VERSION_SHORT)/!' main.elf main.hex main.map
git archive HEAD --format tar.gz --prefix $(PROJECT_NAME)_$(VERSION_SHORT)/ > $(PROJECT_NAME)_$(VERSION_SHORT).tgz
@attie
attie / Makefile
Last active February 4, 2020 21:56
Yocto Out-of-Tree Kernel Module Issues
obj-m := hello.o
SRC := $(shell pwd)
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
### 11:26:27 attie@perdy:~/proj/nmigen [0] ### {1,/home/attie}
$ python3.8 -m venv venv
### 11:26:31 attie@perdy:~/proj/nmigen [0] ### {1,/home/attie}
$ . venv/bin/activate
### 11:26:37 attie@perdy:~/proj/nmigen [0] ### {1,/home/attie}
venv:$ pip3 install 'nmigen-yosys>=0.9.post4248.*'
Collecting nmigen-yosys>=0.9.post4248.*
Downloading https://files.pythonhosted.org/packages/13/22/f7deea3304bfac4c3b8288548049536f48de1467d3111975a637ec2eb92c/nmigen_yosys-0.9.post4248.dev7-py3-none-any.whl (460kB)
|████████████████████████████████| 460kB 2.7MB/s
Collecting wasmtime~=0.16.0 (from nmigen-yosys>=0.9.post4248.*)
### 11:26:27 attie@perdy:~/proj/nmigen [0] ### {1,/home/attie}
$ python3.8 -m venv venv
### 11:26:31 attie@perdy:~/proj/nmigen [0] ### {1,/home/attie}
$ . venv/bin/activate
### 11:26:37 attie@perdy:~/proj/nmigen [0] ### {1,/home/attie}
venv:$ pip3 install 'nmigen-yosys>=0.9.post4248.*'
Collecting nmigen-yosys>=0.9.post4248.*
Downloading https://files.pythonhosted.org/packages/13/22/f7deea3304bfac4c3b8288548049536f48de1467d3111975a637ec2eb92c/nmigen_yosys-0.9.post4248.dev7-py3-none-any.whl (460kB)
|████████████████████████████████| 460kB 2.7MB/s
Collecting wasmtime~=0.16.0 (from nmigen-yosys>=0.9.post4248.*)
@attie
attie / README.md
Created August 11, 2020 20:37
Get Started with OrangeCrap r0.2

Reference

Get Toolchain

# https://github.com/open-tool-forge/fpga-toolchain/releases

read os <<< "linux"
@attie
attie / README.md
Last active August 12, 2020 10:05
Get Started with OrangeCrab r0.2

Orange Crab

Reference

Get Toolchain

# https://github.com/open-tool-forge/fpga-toolchain/releases

Keybase proof

I hereby claim:

  • I am attie on github.
  • I am attie (https://keybase.io/attie) on keybase.
  • I have a public key ASCqW8sJURyxuw7dswIzwzCq7VVlfhU8k2ic2aBWyABEzgo

To claim this, I am signing this object:

import logging
import asyncio
from aramanth import *
from ....support.endpoint import *
from ....gateware.pads import *
from ....gateware.pll import *
from ... import *
class VideoIkea2WireSubtarget(Elaboratable):
@attie
attie / gmail-drive-button.js
Last active June 7, 2024 12:27
Hide "Add to Drive" button for Gmail attachments
// ==UserScript==
// @name Hide annoying buttons on Gmail attachments
// @namespace http://attie.co.uk/
// @source https://gist.github.com/attie/9594a7fc4537137cfa068a3cc53d5ce5
// @version 2024-04-30
// @description Just get rid of the annoying buttons - https://chaos.social/@attie/112360057673910473
// @author Attie Grande <attie@attie.co.uk>
// @match https://mail.google.com/mail/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none