Skip to content

Instantly share code, notes, and snippets.

View nalzok's full-sized avatar

Qingyao Sun nalzok

  • Cornell University
  • Ithaca, NY
View GitHub Profile
@pangyuteng
pangyuteng / README.md
Last active July 15, 2024 09:41
setting up Dell Poweredge R720 + Nvidia Tesla P40 24GB
  Dell Poweredge R720
  Nvidia Tesla P40 24GB 
  GPU pass-through via Proxmox

psu

  • ? am using only one 1100w psu, the other 1100w is not plugged in.
@lunhg
lunhg / job_ci.yml
Created January 26, 2022 19:23
A build script CI/CD job that download a testpypi whl, change the current version and build a whl file again to install it with pip. Must define PROGRAM and VERSION variables.
.build_testpypi_to_oficial_pypi: &build_production_script
- pip install virtualenv wheel
- python -m virtualenv venv && source venv/bin/activate
- python -m pip download --no-deps --index-url https://test.pypi.org/simple/ $PROGRAM
- PACKAGE=$(ls -la $PROGRAM* | awk '{ print $9 }')
- wheel unpack $PACKAGE
- rm $PACKAGE
- WHEEL_FOLDER=$(ls -la | awk '{ print $9 }' | grep $PROGRAM)
- mkdir $PROGRAM-$VERSION
- mkdir $PROGRAM-$VERSION/$PROGRAM
@yorickdowne
yorickdowne / README.md
Last active June 26, 2024 10:31
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Ubuntu 24.04

From the comments: "These exact instructions are not working on Ubuntu 24.04. Ubuntu has changed the naming of ZFS partitions, partition 2 and 3 are switched around, and the boot/efi folder is now different."

I don't have my dual-disk test system any longer, and so can't adjust these steps myself.

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

@crcdng
crcdng / p5_catalina_dev.md
Last active August 31, 2021 06:52
How to fix Processing on MacOSX 15 Catalina

How to fix Processing (https://processing.org) Camera and Microphone on macOS 10.15 Catalina

This solution requires that you are a member of the Apple Developer program

Last updated on 2020_11_08

Update: In Processing alpha2 (15 September 2020) with the libraries Sound 2.2.3 and Video 2.0, Audio and Video input are still broken. The workaround below should work with that version as well, although I have not tested it.

Apple has been changing around things for developers quite a lot since 2019. This concerns (among others):

  • newly required permissions for apps that access the camera and microphone
@elfmimi
elfmimi / gd32vf103.cfg
Last active May 18, 2023 22:56
OpenOCD script for GD32VF103 with improved reset procedure
# OpenOCD script for GD32VF103 with improved reset procedure
# Invoke it like this.
# for Digilent HS2
# openocd -f interface/ftdi/digilent-hs2.cfg -c "ftdi_device_desc {Digilent USB Device}" -f gd32vf103.cfg -c "program binary.elf verify reset exit"
# openocd -f interface/ftdi/digilent-hs2.cfg -c "ftdi_device_desc {Digilent USB Device}" -f gd32vf103.cfg -c "program binary.bin 0x08000000 verify reset exit"
# openocd -f interface/ftdi/digilent-hs2.cfg -c "ftdi_device_desc {Digilent USB Device}" -f gd32vf103.cfg -c "init; reset run; exit"
# for SiPEED USB-JTAG/TTL ( RV-Debugger )
# openocd -f interface/ftdi/minimodule.cfg -c "ftdi_device_desc {Dual RS232}" -f gd32vf103.cfg -c "init; reset run; exit"
@onetransistor
onetransistor / bluepill.ioc
Created September 18, 2018 19:40
STM32CubeMX Project for STM32 blue pill development board
#MicroXplorer Configuration settings - do not modify
File.Version=6
KeepUserPlacement=false
Mcu.Family=STM32F1
Mcu.IP0=NVIC
Mcu.IP1=RCC
Mcu.IP2=RTC
Mcu.IP3=SYS
Mcu.IP4=USB
Mcu.IPNb=5
@chatchavan
chatchavan / README.md
Last active April 27, 2024 20:33
Setup Wifi on Raspberry Pi

Setup Wireless LAN for Raspberry Pi

The following guide describes how to setup Raspberry Pi to connect to Wifi. It was tested on the following environment:

  • Raspberry Pi Model B
  • Edimax EW-7811Un USB Wifi dongle
  • OS: Raspbian Jessie

Here are the overview of the steps:

@vavrusa
vavrusa / dhcp.lua
Last active March 4, 2021 11:46
Lua/C DHCP example#2
-- C definitions
local ffi = require('ffi')
local csym = ffi.C
ffi.cdef[[
/* DHCP header format */
struct __attribute__((packed)) dhcp_msg {
/* Header */
uint8_t op;
uint8_t htype;
uint8_t hlen;
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active July 22, 2024 18:14
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred