Skip to content

Instantly share code, notes, and snippets.

View zerotri's full-sized avatar

Wynter Woods zerotri

  • Santa Rosa, California
View GitHub Profile
@mkettn
mkettn / vivado
Last active April 17, 2025 13:15
run vivado 2017.2 on linux with hidpi monitor and a tiling wm, also pass thru any arguments given, and set the current working dir to /tmp/vivado2017, hence it doesn't create various files in the current working dir. this is by far the most sane configuration i can come up with.
#!/bin/bash
VIVADO_PATH=/opt/Xilinx/Vivado/2017.2
VIVADO_TMP_DIR=`mktemp -d /tmp/vivado2017.2.XXXX`
export J2D_D3D=false
export _JAVA_OPTIONS="-Dsun.java2d.dpiaware=true -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dsun.java2d.xrender=true"
export SWT_GTK3=0
wmname LG3
source $VIVADO_PATH/settings64.sh

[RFC] Addressing the problems with opaque floating point encodings in F/D/Q

Alex Bradbury, lowRISC CIC

Brief problem summary

The current version of the RISC-V ISA specification explicitly leaves the encoding of a single precision value undefined when it is either converted to a wider integer register or written to a wider memory location (e.g. a float written with fsd or fmv.x.d. The motivation for this is to allow a low overhead internal recoding. Unfortunately, the freedom to keep this

@SL-RU
SL-RU / dev_ins.py
Last active July 5, 2023 21:10
Disable touchpad when mouse inserted. Wayland
import pyudev
import subprocess
context = pyudev.Context()
monitor = pyudev.Monitor.from_netlink(context)
monitor.filter_by(subsystem='usb')
def is_m():
global context
@ninedraft
ninedraft / README.md
Last active July 6, 2024 05:58
Python udp broadcast client server example.

Python udp broadcast client-server example

⚠️ ❗ ATTENTION ❗ ⚠️

This gist is deprecated and will not be edited in the future. Consider visit ninedraft/python-udp repo. It will not be deleted, however.

⚠️ ❗ ATTENTION ❗ ⚠️

@coldnew
coldnew / docker-zfs.md
Created November 23, 2016 01:13 — forked from marksteve/docker-zfs.md
Use ZFS Docker storagedriver
  1. Create ZFS pool

sudo zpool create -f zroot /dev/sdaX

  1. Create ZFS dataset

sudo zfs create -o mountpoint=/var/lib/docker zroot/docker

  1. Edit /etc/defaults/docker
@zwcloud
zwcloud / Dog.cs
Created November 21, 2016 08:38
An example on embedding Mono runtime in C/C++.
using System;
public class Dog
{
static public void Type()
{
Console.WriteLine("a Dog!");
}
public void Bark()
{
Page size: 2048 (0x00000800)
Kernel size: 2038328 (0x001f1a38)
Ramdisk size: 782904 (0x000bf238)
Second size: 0 (0x00000000)
Board name:
Command line: root=/dev/nandb decrypt ro console=ttyS0,115200 loglevel=4 ion_cma_512m=148m ion_cma_1g=176m ion_carveout_512m=8m ion_carveout_1g=150m coherent_pool=4m consoleblank=0
Writing test.bin-kernel ... complete.
Writing test.bin-ramdisk.gz ... complete.
@elsehow
elsehow / image-search.py
Last active December 15, 2017 08:48
Google image search in Python3
# setup a custom search http://www.google.com/cse/manage/all
# you can set up wildcards like *.com, *.org, *.net etc to cast a broad net for your custom search
# remmeber to flip the "images" switch if you want that service
from googleapiclient.discovery import build
def image_search (query):
service = build("customsearch", "v1",
developerKey="[YOUR API KEY - console.developers.google.com]")
res = service.cse().list(
@minhoolee
minhoolee / install-opencv-3.0.0
Last active March 31, 2024 04:05
Install OpenCV 3.0.0 for Ubuntu or Debian
# KEEP UBUNTU OR DEBIAN UP TO DATE
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
# INSTALL THE DEPENDENCIES
# Build tools:
@undefinedbehavior
undefinedbehavior / rpi3_rust_led.rs
Last active January 17, 2017 06:47
Rust demo for Pi 3 bare metal
#![feature(asm)]
#![feature(lang_items)]
#![crate_type = "staticlib"]
#![no_std]
const GPIO_BASE: u32 = 0x3F200000; // base address for Pi 2 and Pi 3
fn sleep(value: u32){
for _ in 1..value {
unsafe { asm!("");}