Close
0%
0%

Silly software wishlist

Motivation to do some software projects by writing them down.

Similar projects worth following
Most of these will never be done. Some have been done. The screenshot is RPN http://heroinewarrior.com/utils/rpn2.c a command line calculator which has proved essential, over the decades.



It might feel like every software project has to be bigger than the last software project, or they're not worth doing.  In reality, before Cinelerra, there were a lot of smaller software projects that just edited audio.  You get to a big software project by doing smaller ones that eventually have something in common & appear to be better served if they were all combined.  

We might be in a downward trend in the size of software projects people consider desirable, with mobile computing & retro computing, but the size required to get discovered is definitely growing.  20 years ago, a silly command line program on a personal web page that extracted emails from pine would have gotten thousands of downloads & been enough to start a foundation.  People used to read through freshmeat.net just to discover new software projects.  

Nowadays, you have to look like a corporation, employ every marketing gimmick in the latest developer conference to get discovered in an app store & forget about any personal web page getting discovered. No-one reads through an app store digest just to discover new software projects.




ATC to tablet: Something that automatically captures instructions from air traffic control on a tablet.  Lions will never have enough money to fly airplanes, but based on goo tube videos, it's manely an arcane task of constantly listening to the radio for your call sign & memorizing verbal instructions they give.  The more cryptic ones are the METAR readouts.  It gets real crazy during landings, when ATC blasts out thousands of things & the pilots are shown writing them down, all while the airplane heads towards the ground at 300mph.  

Ideally, ATC would fly planes directly instead of bothering with radio dialog, but lions are keenly aware the reason general aviation is 100 years behind modern quad copters in its level of automation is because of the number of ancient hand flown airplanes around, where the only means of remote control is relaying voice commands through a human.

Based on digital assistant valuations, it should be trivial for a computer to listen for your call sign, do something to get your attention, translate the spoken commands into drawings on a map.  Despite having no flying budget, such a thing could start life as a toy program that listened to internet streams of ATC.

GRAPHER: something that polls text files & constantly updates a simple line graph with the data in the file would be useful. Graphing serial port output in line graphs has been the #1 task for lions for 15 years, but copying from a text editor to star/open/libra office is extremely tedious. It needs a way for the user to specify a range of lines in the file to constantly graph, with text values, wildcards, & by pointing & clicking on the graph. The range needs to be relative to the start or the end of the file.

An X11 program in C would take only a few hours to write, but lions would rather spend forever contemplating using web browser javascript so someone else could use it.

Big Falcon Simulator, a very high fidelity simulation of a very large rocket, with the highest quality models & sounds possible. It would accurately simulate flights or have a racing mode with knockdowns.  Probably similar gameplay to Asphalt Extreme, but using flight controls.  Previous simulators have horrible graphics. They especially suffer in their renderings of fire.  This is the most ridiculous thing lions can imagine.

symbol.c

What library contains the symbol?

text/x-csrc - 2.06 kB - 01/25/2020 at 07:57

Download

bindiff.c

Show locations of differences in binary files without showing actual data.

x-csrc - 2.29 kB - 04/26/2019 at 20:02

Download

push.c

Move mutiple files to an android phone

x-csrc - 559.00 bytes - 03/09/2019 at 18:13

Download

dailymile.c

Recover the data from a dailymile.com account, except routes, comments, photos.

x-csrc - 10.06 kB - 12/09/2018 at 02:55

Download

diffdir.c

find the differences between files of the given extensions

text/x-csrc - 11.20 kB - 11/06/2018 at 22:42

Download

View all 8 files

  • Sleep mode on Linux

    lion mclionhead21 hours ago 0 comments

    After 23 years of either leaving Linux boxes on 24/7, running them in virtual machines, or turning them off at the end of every day, the lion kingdom finally got a lucky combination that supported suspend mode.  It was the Ubuntu 16 + Ryzen 7 2700x + Prime X470 Pro motherboard.  What a joy it is to not have to reopen all the programs of the previous day.

    The command to suspend it is pm-suspend.  The mane problem is uninterruptible sleep processes.  It has to SIGSTOP all processes for some reason.  If it runs into an uninterruptible sleep process, it gives up.  Uninterruptible sleep happens to lions because a kernel module died.

    The pm-hibernate command just shuts it down.  pm-hibernate is useful if the shutdown command gets to "power down" but doesn't turn off the power.  pm-hibernate is the 1st command that turns off the power in over 20 years.

    It was then that the limitations began.  pm-suspend disconnects all network connections so vnc & ssh die.

  • The dreaded mmc_ioctl_cdrom_read_audio kernel bug

    lion mclionhead03/22/2020 at 05:47 0 comments

    Linux was a lot more reliable before it was heavily commercialized, but it's still the most reliable operating system.  

    As lions do when they don't have to commute, it was back to transferring optical disks. This one was the lion kingdom's 1st encounter with CD rot. It was a swirly plant pattern inside the plastic. It's not scribbling from a human or a stain from a liquid but the propagation of a fungus.  The disk was manely unreadable after 30 years.

     Naturally, there are no web pages on the subject for the last 20 years.  The last time someone encountered CD rot was a Michael Bolton fan who since dropped offline, turned bald, had 3 marriages, & put 5 kids through college.  The disks have also lost the fresh plastic smell only lions of a certain age remember.

    It was here that the lion kingdom discovered the famous mmc_ioctl_cdrom_read_audio kernel bug of at least 5 years.  It's clear that not enough people still rip CDs for the cdrom driver to be manetaned, so it hasn't been able to bypass bad sectors in decades.  The lion kingdom made a simple workaround 

    In drivers/cdrom/cdrom.c -> cdrom_read_cdda_bpc:

    It needs to check s for  nil

    if (blk_execute_rq(q, cdi->disk, rq, 0)) {
        struct request_sense *s = rq->sense;
        pr_info("cdrom_read_cdda_bpc %d lba=%d s=%p\n", __LINE__, lba, s);
        ret = -EIO;
        if(s != 0)
        {
            cdi->last_sense = s->sense_key;
        }
    
    

  • Testing EAP-TLS with freeradius & eapol_test

    lion mclionhead03/12/2020 at 04:15 0 comments

    This is only of interest to someone putting together a wireless network of an embedded nature & wanting to prevent unauthorized use by using a protocol called EAP-TLS.  After encountering a need to set up freeradius with eapol_test & finding very little documentation on the subject, the lion kingdom decided to note down the hard earned steps.  Downloading, compiling, & installing freeradius 3.0.20 from source on Ubuntu 16 was actually reasonably straightforward.  

    It tried to put all its configuration files in /usr/local/etc/raddb/ but it apparently failed. It didn't create any of the symbolic links.  The lion kingdom deleted /usr/local/etc/raddb/ & copied the raddb inside the build tree to /usr/local/etc/

    Comment out filter_username in /usr/local/etc/raddb/sites-available/default
    to defeat the realm errors.

    Create all the required certificates & keys by following the README:
    /usr/local/etc/raddb/certs/README

    Some useful nuggets about the file types generated: 

    A .crt is a public key with extra information about who owns it.  A .crt is used to verify a peer isn't an imposter.  A .pem is a .crt with even more information.  It is not the same as a .crt.  A .key is a private key.  .keys are never supposed to be seen by anyone but their owners.  

    The general idea is the client encodes some piece of data or a hash of some message using its private .key "signing".  The radius server decodes it with the client's public .pem key.  If it decodes properly, the server knows only the true client owning the true private .key "signed" it. 

    Of course, to be sure the public .pem key belongs to the client instead of an imposter, we have yet another layer, the certificate authority.  That encodes some certificate authority stuff or a hash of the client's public key with its private ca.key & puts it in the client's .pem file "signing".  The radius server can decode it with the certificate authority's public ca.pem key.  If it decodes properly, the server knows the CA vouched for the identity of the peer by "signing" it with its private .key.

    The certificate authority can actually have other certificate authorities "sign" its public keys, creating a "chain of trust".

    All these bits combine to form a PKI or "public key infrastructure".

    freeradius looks in the ca.cnf, server.cnf, & client.cnf files to find the right settings for making all the certs & keys.  The required changes are given in the README.  For a test environment, it's easier to make all the passwords identical & use simple names like x.  It still needs actual country & state codes.

    client.cnf needs a full name@domane.suffix emailAddress to make a unique client .pem for each client or the file will always be just .pem.  It also needs the full domane name to pass other tests.

    It took 1 more command to get it to work:
    openssl x509 -inform PEM -outform DER -in client.pem -out client.der

    A bug in openssl required having a copy of the certificate in .der format or it would complain about being unable to read it.

    Freeradius should then run in the foreground & print lots of debugging information with 

    radiusd -X

    The next step is building the eapol_test client.  This is part of the ages old wpa_supplicant package which is actually inside the hostapd source code & not built by default.  wpa_supplicant has to be built from source to get the eapol_test program.  Go into hostapd*/wpa_supplicant & run make eapol_test

    eapol_test needs a config file & a bunch of client certs.  The freeradius README actually created the eapol_test certs & put them in /usr/local/etc/raddb/certs/.  They have to be copied to where eapol_test is going to look for them.

    mkdir -p /var/certs/freeradius/

    cp ca.pem lion@mane.com.pem client.key client.crt /var/certs/freeradius/

    Then create an eapol_test.conf file in the wpa_supplicant build directory. ...

    Read more »

  • Thrustmaster busted again

    lion mclionhead02/28/2020 at 05:37 0 comments

    The lion kingdom got to discovering the /opt/google/earth/pro/resources/flightsim/ directory.  That has ini files for configuring the flight simulator.  flightsim.ini  needs to point to controller/thrustmaster.ini in its configurations section.

    /opt/google/earth/pro/resources/flightsim/controller has ini files for different joysticks.  generic.ini needs to be copied to thrustmaster.ini Then its controllers_supported section needs a regular expression which identifies the iProduct name in lsusb -v.  This is not to be confused with the iManufacturer shown in lsusb.  The lion kingdom tried iProducts of *Flight*Hotas* & *Thrust*

    Goog earth uses a direct libusb connection to the USB device, rather than the /dev/input tree or any XInput method.  It finds the USB device with the iProducts name in thrustmaster.ini.  Since the USB device is automatically claimed by the kernel's HID driver, you need to release the kernel driver with a home made libusb program that calls libusb_detach_kernel_driver.

    Helas, none of these steps got the goog to detect the joystick.  Corrupting flightsim.ini by removing the controller/thrustmaster.ini entry made it fail, but deleting or corrupting the controller/thrustmaster.ini file had no effect.

    Based on the flightsim.ini file, the game controller support is a future feature that was never implemented.  Someone spent a lot of time making the joystick files in /opt/google/earth/pro/resources/flightsim/controller but none of them were ever used.  It's like a big company where everyone has 1 job, regardless of it ever being used.

    An anomaly in flightsim.ini was a different controller/.ini file being specified for each airplane, yet the dialog box in goog earth shows a common joystick option for both airplanes.  Goog earth doesn't even link libusb.so


    Since the last major update of Goog Earth, 10 years ago, no-one really uses it anymore.  The very idea of plotting GPS coordinates on a map has gone away like a pair of VR goggles.  The lion kingdom always knew the Ryzen was going to be a return to dual booting Windows.  This might be the 1st need for native Windows in 15 years. 

    The only other idea is making the joystick generate the keypress events required to match its analog position & hope the goog doesn't drop any keypress events.


  • Google earth with thrustmaster

    lion mclionhead02/11/2020 at 05:56 0 comments

    A reminder to get around to it, someday.  There's a note about translating arbitrary joystick input to Goog Earth controls.

    https://www.reddit.com/r/flightsim/comments/8kji5a/google_earth_flight_sim_using_your_flight/

    Helas, these are for windows only. There's no documentation from the goog on using a joystick with goog earth on Linux.  There is only 1 nugget about editing the drivers.ini file, from 2012.

    http://mitchtech.net/mult-axis-google-earth-controller/

    The Goog earth flight simulator was terrible, in that speeds increased with lower altitude, but it was the only one with real scenery for the entire planet.  Lions used to play it all the time with the keyboard when commutes were only 30 minutes.  Half day commutes ended that & all use of the thrustmaster.  Lions have never played a flight simulator with a real joystick.

    The FAA actually allows flight simulators without G forces to be used for manetaining IFR proficiency.  Lions always suspected it was the G forces rather than the visuals causing the disorientation, because we've all flown simulators on instruments without any problem.  Watching videos, it's the disorientation which kills off VFR pilots, rather than the knowledge of the controls or the distractions the FAA tests.

  • Getting a rotation matrix

    lion mclionhead01/27/2020 at 19:16 0 comments

    One of the greatest functions ever written is the rotation matrix calculator or affine transformation. Pass it a direction vector for the Y axis to point in. It's hard coded for the Z axis to point up. Then, merely multiplying the rotation matrix by any coordinate makes the coordinate relative to the direction vector. All those highschool trig calculations & polar conversions are reduced to a matrix multiplication.

    python code:

    def vecToRot(direction):
    direction = direction.normalized()
    up = Vector([0, 0, 1])
    xaxis = up.cross(direction)
    xaxis = xaxis.normalized()
    
    yaxis = direction.cross(xaxis)
    yaxis = yaxis.normalized()
    
    result = Matrix((
    (xaxis.x, yaxis.x, direction.x), 
    (xaxis.y, yaxis.y, direction.y), 
    (xaxis.z, yaxis.z, direction.z)))
    return result
    
    usage to rotate an x,y,z coordinate 45 deg:
    mat_rot = vecToRot(Vector([1, 1, 0]))
    rotated_coord = mat_rot * Vector(x, y, z)
    
    

  • What library contains a symbol?

    lion mclionhead01/25/2020 at 08:17 0 comments

    Lions long struggled with finding the library that contains a symbol.  The UNIX gurus can do it with a find command & some regular expressions.  Lions wanted a simple command to run, without any effort looking up regular expressions.  

    https://cdn.hackaday.io/files/1380505906331200/symbol.c

    This only returns exact matches.  It's easy to change it to match all occurrences & symbol usage.  Forget about stripped libraries & macros.

  • spectrum analyzer with a DVB dongle

    lion mclionhead01/12/2020 at 23:13 0 comments

    Back when Comca$t blocked recording of local channels, the lion kingdom considered hiking to the top of the local mountains to get within view of Sutro tower & recording local channels that way. It would have required a big PC with the original PCHDTV PCI card & a big hard drive to record the 12GB of data per hour. There would be no way to watch it on the mountain.

    15 years later, there's a cheap USB dongle that can play local channels on a phone. The dongle actually dates back 10 years, but only now is becoming needed. The original plan would now involve hiking up with a phone & a small SD card. It would even be able to show the video.

    More importantly, since nothing is really on local channels that can be downloaded elsewhere, the dongle can be used as a 2Ghz spectrum analyzer. There has been a growing need for a spectrum analyzer below 2Ghz.

    The day job uses a more expensive HackRF as its spectrum analyzer. It goes to 6Ghz, has a transmitter & a very wide 8Mhz bandwidth. The TV dongles save money by only having 3.2Mhz bandwidth.  Trying to find signals with 8Mhz is already pretty horrible.

    The mane challenge with the TV dongle is the software is barely functional & would most certainly require breaking out Android Studio. It's tempting just to spend 4x more on a hackrf, but there's also 10Ghz radio.

    https://www.amazon.com/RTL-SDR-Blog-RTL2832U-S…/…/B0129EBDS2

  • Projects instead of tutorials & contests

    lion mclionhead09/17/2019 at 06:09 1 comment

    20 years ago, the way to learn how to program something was to download another program & copy bits of it.  The internet abounded in software source code.  Most projects were never finished & only partially worked, but taught the techniques of programming.  Lions always looked for projects that could run on their own & already did most of the business.

    Today, instead of software source code, knowledge is disseminated in videos.  You can't copy & paste anymore, can't download & run the examples, & it takes a bit longer to scrub through a video looking for enough screenshots of source code to copy the examples.  Most of the time, they don't provide a runnable example but bits of a closed source product.

    We got video tutorials because they can be monetized & people don't program for fun anymore as much as making money.

  • remembering the screen program

    lion mclionhead09/08/2019 at 19:46 1 comment

    Lions used to discover odd UNIX programs by examining the output of ps on multiuser systems with actual multiple users.  When they got their own personal UNIX boxes, those days ended.  Screen was a very useful program lions once discovered, but forgot about.  Not sure if it was originally just used on vt100's & xterm ended up replacing it or if the resolution was too low to have more than 1 xterm.  

    It was forgotten for 20 years, but would be useful in today's world of having to run browsers in multiple accounts.  The lion kingdom's typical development environment has evolved into 5 xterms for 5 tasks which would best be consolidated:

    openocd

    telnet into openocd

    builds

    search commands

    text editors

    The basic screen commands:

    ctrl-a c creates a new shell

    ctrl-a n go to the next shell

    ctrl-a p  go to the previous shell

    ctrl-a " shows the window list.  

    In the window list, , . move the highlighted window up or down the list.

    ctrl-a ctrl-a toggles between 2 shells

    More advanced commands:

    ctrl-a d detach the current shell, making it a daemon.  You can log out without ending it.

    screen -r reattaches to the daemon & shows the terminal output

    screen -ls shows the daemons

    Scrolling in screen:

    Screen by default doesn't use the xterm scroll buffer, but has its own buffer which is intended for copying text.

    ctrl-a ESC enters the copy mode

    In copy mode, ? / n cause it to search for text the same as less & vi, but it doesn't show line numbers or wrap around.  g G cause it to go to the start & end.

    cursor keys & pgup scroll back

    ESC 3  times escapes from the copy mode

    To erase the scroll buffer, you have to enter 2 commands with crtl-a : 

    scrollback 0

    scrollback 1000

    To make screen more intuitive, it must be forced to use the xterm scroll buffer by editing /etc/screenrc

    This magic line should already be in /etc/screenrc & just need to be uncommented:

    termcapinfo xterm|xterms|xs|rxvt ti@:te@

    The xterm scroll buffer is not swapped when changing shells.  You still have to go back to abusing the copy feature for that.  Lions used to jump around the screen program like a pro & screen's disabling of the xterm scroll buffer makes lions believe it was originally just needed on vt100's.

    The screenrc file also allows binding custom commands  to keys, like erasing the scroll buffer.

    There is a split screen mode, which defeats the purpose of multiplexing shells into a single terminal but looks neat.

    The titles of the screens have to be customized.  In Linux, it's done by appending a kludge to print an escape sequence right before the command prompt.  It can't show the currently running program but it can show the prompt.  It takes some doing to delete all the other PS1 declarations & make sure this is the only one:

    export PS1='`whoami`@`hostname`:`pwd`% '

    # customize the screen title
    case $TERM in
        screen*)
            # ESC k ESC \ tells screen to set its title

            # \w prints the working directory
            SCREENTITLE='\[\ek`whoami`@`hostname`:\w\e\\\]'
            ;;
        *)
            SCREENTITLE=''
            ;;
    esac
    PS1="${SCREENTITLE}${PS1}"

View all 55 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates