Thursday, September 19, 2024

Terminal Based Calendar: ncal

A nice simple Calendar.

Terminal Typing Game: Smassh

I Love this it looks like a slimmed down version of monkeytype. I always wished I could run monkeytype on a raspberry pi but the browser eats up too much resourcs so this is a perfect alternative. Its made with python

It can be installed with:


pip install smassh
The Github Page For Smassh

Wednesday, September 11, 2024

disabled scenarios in make

integromat disabled my 'scenario' because i didn't have a closing h2 tag supposedly. I wish there was an ignore feature so i don't need to log to the website to fix it. You end up with a queue of files when that happens and a bunch of error emails to delete.

Hmm... maybe there is a way I just haven't found it yet.

parsefeed python library to compile blogposts into pdfs

extract rss feed to html with parsefeed python


import feedparser

# URL of the Atom feed
feed_url = "https://ecksesontress.blogspot.com/feeds/posts/default"

# Parse the feed
feed = feedparser.parse(feed_url)

# Open file for writing (creates the file if it doesn't exist)
with open('blogposts.html', 'w') as file:
    # Write the beginning of the HTML document
    file.write("\n\nBlog Posts\n\n\n")
    
    # Iterate over the entries (posts) and extract titles and summaries
    for entry in feed.entries[:10]:  # Limit to the first 10 entries
        title = entry.title
        summary = entry.summary  # This is typically the body content
        
        # Write the title as an 

and the summary (body) below it file.write(f"

{title}

\n") file.write(f"{summary}\n") file.write("
\n") # Separator for readability # Write the end of the HTML document file.write("\n\n")

Sunday, September 8, 2024

vim 9 precompiled

debian only goes up to vim 8. Trying to get coc snippets to work for typescript and not use neovim. This ppa has a precompiled vim 9


sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim

use elisp to find lowest price per category

evaluated.org
** Lowest Price Item In Each Category

| Category             | Price | Item            |
|----------------------|-------|-----------------|
| beverages            | 1.95  | canned pop      |
| side-orders          | 1.15  | gravy on fries  |
| subs                 | 5.45  | veggie (small)  |
| hot-sandwiches       | 11.95 | hot hamburger   |
| on-a-bun             | 5.25  | hamburger       |
| ask-your-server      | 3.95  | s.o.t.d         |
| salads               | 4.15  | small tossed salad |
| sandwiches           | 5.15  | fried egg       |
| pitas                | 6.25  | breakfast       |
| omelets              | 9.95  | cheese          |
| french-toast-and-pancakes | 3.75 | 1 lg pancake |
| breakfast-sides      | 1.75  | muffin          |
| breakfast            | 9.25  | meatless        |


** lisp code to find lowest price per category

#+BEGIN_SRC emacs-lisp :results output
(defun find-lowest-price-per-category ()
  "Find the item with the lowest price for each category from an Org table."
  (interactive)
  ;; Ensure we're in an Org table
  (when (org-at-table-p)
    (let ((table (org-table-to-lisp))
          (result '()))
      ;; Skip the header row
      (dolist (row (cdr table))
        (let* ((category (nth 0 row))
               (item (nth 1 row))
               (price (string-to-number (nth 2 row)))
               (existing-entry (assoc category result)))
          (if existing-entry
              (let ((current-lowest (cdr existing-entry)))
                (if (< price (car current-lowest))
                    (setcdr existing-entry (cons price item))
                  ;; Do nothing if the current price is not lower
                  ))
            (push (cons category (cons price item)) result))))
      ;; Print the result in the buffer
      (with-output-to-temp-buffer "*Lowest Prices by Category*"
        (dolist (entry result)
          (let ((category (car entry))
                (lowest (cdr entry)))
            (princ (format "%s: %.2f - %s\n" category (car lowest) (cdr lowest)))))))))

;; Bind the function to a key for easy access
(global-set-key (kbd "C-c l") 'find-lowest-price-per-category)
#+END_SRC

Friday, September 6, 2024

Windmill Restaurant Menu

CAPTURE-notes.org
* [2024-09-06 Fri] windmill restaurant
hours:
monday-fri 6am-3pm
sat 6am-2pm
closed sun & holidays

***** breakfast
all eggs are large & grade A served with home fries, toast, jam, marmalade and coffee

| 2 eggs+bacon,ham/sausage         |  9.95 |
| 2 eggs+peameal                   | 10.95 |
| 2 eggs + steak                   | 14.95 |
| meatless                         |  9.25 |
| ham off the bone                 | 10.95 |
| hungryman(3egg2bacon,2ham,3saus) | 16.95 |

add extra egg to any for $ 1.35

***** french toast & pancakes
| pancakes w coffee        |  9.50 |
| choc pancakes w coffee   | 10.50 |
| lg frenchtoast w coffee  |  9.50 |
| reg frenchtoast w coffee |  8.50 |
| 1 lg pancake             |  3.75 |

***** omelets
served w sliced tomato, home fries, and toast
| ham/western/greek | 10.95 |
| spinach&cheese    | 10.95 |
| mushroom or veg   | 10.95 |
| cheese            |  9.95 |

***** pitas

| breakfast             | 6.25 |
| peameal w cheese pita | 6.25 |
| chicken pita          | 6.25 |

***** breakfast sides
| bacon/ham/sausage | 4.15 |
| peameal           | 4.50 |
| fried mushrooms   | 4.50 |
| toast(jam+peanut) | 2.65 |
| tomato            | 2.75 |
| pickle            | 2.75 |
| muffin            | 1.75 |



***** sandwiches

| fried egg                       | 5.15$ |
| egg salad                       | 5.75$ |
| grilled cheese                  | 5.15$ |
| gc + bacon                      | 6.15$ |
| blt                             | 6.15$ |
| tuna salad                      |  6.45 |
| peameal                         |  6.45 |
| sliced turkey                   |  6.45 |
| reuben                          |  7.75 |
| club w fries                    | 11.95 |
| ham or bacon w egg              |  6.15 |
| philly cheesesteak w fries      | 11.95 |
| windmill sandwich               |  7.50 |
| western                         |  6.15 |
| western w bacon cheese          |  7.95 |
| bacon,egg cheese english muffin | 6.15  |

***** salads
| small tossed salad |  4.15 |
| large tossed salad |  5.75 |
| sm greek           |  5.50 |
| lg greek           |  7.50 |
| sm greek w chicken |  9.95 |
| lg greek w chicken | 11.95 |

***** ask your server

| daily lunch special    | 11.95 |
| daily sandwich special |  8.95 |
| s.o.t.d                |  3.95 |

***** on a bun
served w mustard, relish, onions, tomatoes, lettuce and pickles

| hamburger                    | 5.25 |
| cheeseburger                 | 5.95 |
| bacon burger                 | 6.15 |
| banquet burger               | 7.15 |
| roast beef                   | 7.75 |
| corned beef                  | 7.75 |
| steak on a kaiser            | 9.75 |
| sausage on a bun w saurkrout | 6.50 |

***** hot sandwiches

| hot hamburger             | 11.95 |
| hot turkey(white mean)    | 12.95 |
| hot beef                  | 11.95 |
| chicken fingers and fries | 11.95 |

***** subs
| sub                    | small | large |
| corned beef/roast beef |  6.75 |  9.50 |
| ham                    |  6.15 |  8.25 |
| veggie                 |  5.45 |  6.95 |
| turkey                 |  7/15 | 10.75 |
| blt                    |  7.75 |  9.15 |
| club                   |  8.50 | 11.75 |

***** side orders
| sm fries          | 3.75 |
| lg fries          | 5.50 |
| sm onion rings    | 3.95 |
| lg onion rings    | 5.75 |
| sm homefries      | 3.75 |
| lg homefries      | 5.50 |
| sm poutine        | 4.95 |
| lg poutine        | 6.50 |
| cheese slice 1.35 | 1.35 |
| garlic bun        | 2.50 |
| gravy on fries    | 1.15 |
| gravy on side     | 1.65 |

***** beverages

| coffee/tea | 2.50 |
| hot choc   | 2.50 |
| snapple    | 2.95 |
| nestea     | 2.65 |
| v-8        | 2.95 |
| canned pop | 1.95 |

how to use htmlize (doom-manegarm theme)

*new*<6>
** how to make styled pages quickly in emacs
- m x package install the htmlize plugin
- spc b N to create a new buffer
- m x enable org mode

  Write the body of the webpage you want to create

*** use themes to apply styles
-  spc h t to select themes
(if you want them to persist add them to your config)
- spc f p to edit the configs if you want.
- htmlize the buffer

**** copy the html
- shift v (visual mode)
- shift g (jump to bottom)
- double quote plus y (yank to clipboard register)

***** use your html
I like to test it out on codepen if I have a browser handy.
or I paste it into blogger.

emacs htmlize package is better than using org export (includes the css)

*new*<3>
* TODO get a raspberry pi zero for lower power consumtion
- pi zero + adapter to 3b case
  or pizero usb hub hat? It needs audio out.
- audio hat or existing interface?
  maybe pi A would be better? (it has a built in audio)

@PISHOP.ca

  | item                |   price |
  | -----------------   |  ------ |
  | pizero              |   29.95 |
  | no header pi zero   |      20 |
  | pi 41g              |   48.95 |
  | pi 4 2g             |   62.95 |
  | 3a+                 |     35$ |
  | 3b+                 |   48.95 |
  | pi zero no wifi     |     14$ |
  | pi4 2g budget kit   |     84$ |
  | pi4 4g model budget |   99.95 |
  | pi4 8g budget kit   | 129.95$ |
  | pi 5 kit 2g         |     168 |
  | pi 5 8 g            |     198 |
  | usb audio adapter   |   6.98$ |
  | hifiberry dac zero  |   26.95 |
  | pi zero usb stem    |    7.95 |
  | flirc pi zero case  |   17.95 |
  | pi zero to 3b case  |   21.95 |
  |                     |         |


  pi 5 doesn't have a headphone jack, they sell one for 7$ though.
  3a only has one usb. its 35$
  6.95$ official 3a case
---

The pi4 budget kit from pishop.ca is the best deal for a pi 4.
for 130$ you get:
        - pi4 8g
        - case
        - powersupply

---

cm4 io adapter boards 28$
- can plug in ssds
- has 2 usbs and hdmi.


* pi zero to 3b adapter
[[https://www.pishop.ca/product/raspberry-pi-zero-to-3b-adapter-alternative-solution-for-raspberry-pi-3-model-b-b/][Raspberry Pi Zero To 3B Adapter, Alternative Solution for Raspberry Pi 3 Mode...]]  dont bother it doesn't have audio adapter!
[[https://www.pishop.ca/product/raspberry-pi-zero-2w-to-3b-adapter-alternative-solution-for-raspberry-pi-3-model-b-b/][Raspberry Pi Zero 2W To 3B Adapter, Alternative Solution for Raspberry Pi 3 M...]] 28$ one <- this is better bc it has audio out!!!
Not compatible with the first generation Zero
--------------------------------------------
[[https://www.pishop.ca/product/raspberry-pi-zero-2-w/][Raspberry Pi Zero 2 W - PiShop.ca]] 21$ no headers. maybe fits better in the case. ( the 3b adapter uses pogo pins no need for headers )
[[https://www.pishop.ca/product/raspberry-pi-zero-2-w-with-pre-soldered-headers/][Raspberry Pi Zero 2 W with Pre-soldered Headers - PiShop.ca]] 29.95 with headers
--------------------------------------------
[[https://www.pishop.ca/product/official-raspberry-pi-b23-case/][Official Raspberry Pi Case, White and Red (B+, 2, 3B, 3B+)]] 10.95
this is the case i have [[https://www.pishop.ca/product/highpi-raspberry-pi-case-black/][HighPi Raspberry Pi Case - Black]] its $12.95

---
THE TOTAL.
| item    | price |
| case    | 12.95 |
| pizero  |    21 |
| adapter |    28 |
| TOTAL   | 61.95 |
#+TBLFM: $2=vsum(@2$2..@-1$2)

to get the total c-c =
@4$2=vsum(@2$2..@-1$2)
vsum

* 3a? or zero?
pros and cons

| 3a          | zero     | pi4 1g | pi3b |
| 1 usb       | 4 usbs   |        |      |
| no ethernet | ethernet |        |      |
| 41.95       | 61.95    |  55.91 |61.90 |

pi4 1g ram 48.95 + 6.96 case
[[https://www.pishop.ca/product/raspberry-pi-4-model-b-1gb/][Raspberry Pi 4 Model B/1GB - PiShop.ca]]

pi3 a+ 35$ total = 41.95$
[[https://www.pishop.ca/product/raspberry-pi-3-model-a-plus-512mb-ram/][Raspberry Pi 3 - Model A+ (PLUS) - LATEST "A" VERSION]]

pi3b+ ( mine ) 48.95$ + my case 12.95$ = 61.90 in total
[[https://www.pishop.ca/product/raspberry-pi-3-model-b-plus/][Raspberry Pi 3 - Model B Plus (B+)]]

pi3a+ case 6.95$
[[https://www.pishop.ca/product/official-raspberry-pi-3-a-case/][Official Raspberry Pi 3 A+ Case]]

        - do i need the 3 usbs?
        - is the pi4 worth it 1g is like no ram.