Skip to content

Instantly share code, notes, and snippets.

View jwm-art-net's full-sized avatar
💭
ex hobbyist coder

James Morris jwm-art-net

💭
ex hobbyist coder
View GitHub Profile
@jwm-art-net
jwm-art-net / gist:7646636
Created November 25, 2013 18:55
sed delete fluxbox xscreensaver menu entries
# use grep to check the regex:
grep '\[exec[]]\s[(].*[)]\s[{]/usr/lib/xscreensaver/.*\s-root[}]' Downloads/menu
# ie here's what it matches:
# [exec] (Abstractile) {/usr/lib/xscreensaver/abstractile -root}
# [exec] (Anemone) {/usr/lib/xscreensaver/anemone -root}
# [exec] (Anemotaxis) {/usr/lib/xscreensaver/anemotaxis -root}
# [exec] (Apollonian) {/usr/lib/xscreensaver/apollonian -root}
#!/bin/bash
#
# scroll text - scrolls text
# by james w. morris.
#
# creates a video of text scrolling over moving stripes to
# give slight parallax effect.
#
# for demo see: http://youtu.be/_kKpCxgNQyM
#
@jwm-art-net
jwm-art-net / getfit
Created May 19, 2020 19:56
Pull .fit files off my Garmin Edge 510 and put into a year folder and convert to gpx.
#!/bin/bash
function mountpoint_from_vendor_id
{
VENDORID="$1"
iserial=$(lsusb -v -d "$VENDORID": 2> /dev/null | grep iSerial -m 1 | cut -d ' ' -f 3)
}
SRCDIR="/run/media/sirrom/GARMIN/Garmin/Activities"
@jwm-art-net
jwm-art-net / skills-plan.c
Created March 22, 2025 23:27
Simple c program to generate a training plan schedule for learning physical skills, the example is for bicycle trials
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
//#define DEBUG 1
typedef struct item {
const char* str;
struct item* next;
# | WARM UP | SKILL A | SKILL B | OBSTACLE
#-- | --------------- | --------------- | --------------- | ---------------
#1 | long skinny | 1 | side hops | 1 | front hops | 1 | l-shape 2ph-hw-pallet | 1
#2 | small gaps | 1 | long gaps | 1 | wheelbase hops | 1 | boulder | 1
#3 | rear wheel pivots | 1 | pedal ups | 1 | rotational hops | 1 | off-camber hw-pallet | 1
#4 | free/w | 1 | lunge | 1 | wheel swap | 1 | flower pot | 1
#5 | skinny corners | 1 | side hops | 2 | high roll ups | 1 | a-beam | 1
#6 | small drops n hops up | 1 | bunny hops | 1 | rear wheel twist | 1 | stubby skinny | 1
#7 | pivot up | 1 | side hops | 3 | free/b | 1 | incline | 1
#8 | rear wheel