Skip to content

Instantly share code, notes, and snippets.

View pre63's full-sized avatar
πŸš€
πŸ€– for the win

pre63

πŸš€
πŸ€– for the win
View GitHub Profile
@pre63
pre63 / diners.hs
Created April 23, 2022 17:29 — forked from egonSchiele/diners.hs
Dining philosophers solution in Haskell using STM. Taken from http://rosettacode.org/wiki/Dining_philosophers#Haskell with some minor modifications.
import Control.Monad
import Control.Concurrent
import Control.Concurrent.STM
import System.Random
import Text.Printf
-- Forks
type Fork = TMVar Int
newFork :: Int -> IO Fork
# download from http://sourceforge.net/projects/aria2/files/stable/aria2-1.19.0
sudo yum install gcc-g++ openssl-devel -y
tar xvfj aria2...tar.bz2
./configure
make -j$(nproc)
sudo make install
@pre63
pre63 / README.md
Created October 28, 2020 04:34 — forked from busypeoples/README.md
Loader

Loader

Introduction

Minimal loader with state management capabilities.

Checkout out the demo.

Setup

Make sure to add a .babelrc file:

@pre63
pre63 / bk393.cc
Last active May 12, 2020 21:17 — forked from dstahlke/bk393.cc
Linux driver for B&K Precision 393 multimeter
// Mac driver for B&K Precision 393 multimeter.
// Install boost: sudo port install boost or brew install boost
// g++ -Wall -Wextra -std=c++11 -o bk393 bk393.cc
// It currently points to /dev/cu.usbserial-AB0K0PZE, but I'd recommend adding a udev rule to get a consistent device name:
// SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A60198LN", MODE="0664", GROUP="mygroup", SYMLINK+="bk393"
#include <boost/utility.hpp>
#include <array>
#include <iomanip>