Console Blackjack in Raku

Console Blackjack in Raku

I wrote a console version of Blackjack in Raku: https://github.com/gdonald/Console-Blackjack and released it as module: Console::Blackjack

Read More...

Convert one m4a file to many mp3s

#!/bin/bash while [ $# -gt 0 ]; do ffmpeg -i "$1" 2> tmp.txt while read -r first _ _ start _ end; do if [[ $first = Chapter ]]; then read # discard line with Metadata: read _ _ chapter ffmpeg -vsync...

Read More...

Raspberry Pi LEDs Test

#!/usr/bin/env python3 import time import RPi.GPIO as GPIO GPIO.setmode( GPIO.BCM ) ENABLE = 1; DISABLE = 0 RED = 23; GREEN = 24; BLUE = 25 RGB = [ RED, GREEN, BLUE ] RGB2 = RGB[::-1]

Read More...

go log function

func log(s ...interface{}) { f, err := os.OpenFile("info.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { fmt.Printf("error opening log file: %v", err) os.Exit(1) } defer f.Close()...

Read More...

Linux Kernel Powerball Module

Linux Kernel Powerball Module

I don't play the lottery but I find random number generators and the Linux Kernel interesting so I wrote a simple Linux Kernel module that does a PowerballTM "quick pick". You can download it from...

Read More...