Skip to content

Instantly share code, notes, and snippets.

@vdeemann
vdeemann / leap.rkt
Created April 4, 2024 21:16
exercism Scheme exercises
#lang racket
(require racket/trace)
(define (leap-year? year)
(if (and (and (div-by-4? year) (div-by-100? year)) (div-by-400? year)) #t
(if (and (div-by-4? year) (not (div-by-100? year))) #t #f)))
(define (div-by-4? year)
(if (= (modulo year 4) 0) #t #f))
brew install elixir
mix archive.install hex phx_new
mix phx.new demo
################
# postgresql development environment setup
# https://www.highgo.ca/2023/06/23/setup-postgresql-development-environment-on-macos/
brew install git
brew install icu4c
@vdeemann
vdeemann / chapter-1.1-1.3.rkt
Last active April 6, 2024 20:53
how-to-design-programs
(+ 1 2)
(+ 1 (+ 1 (+ 1 1) 2) 3 4 5)
(+ 3 4)
;; Play with your computer’s mouse to find the menu that changes the
;; fraction into decimal expansion.
;; https://stackoverflow.com/a/76037629/8706936
;; Language > Choose Languages > "Beginning Student" > "Show Details"
@vdeemann
vdeemann / chapter-4.rkt
Last active March 29, 2024 01:29
the-little-schemer
#lang racket
(require racket/trace)
(define o+
(lambda (n m)
(cond
((zero? m) n)
(else (add1 (o+ n (sub1 m)))))))
;(trace o+)
#lang sicp
;#lang racket
(define (square x) (* x x))
(define (sum-of-squares x y)
(+ (square x) (square y)))
(define (sum-two-largest a b c)
(cond
#lang racket
(require racket/trace)
;(*) Find the last box of a list.
; my recursive length of a list
(define (len lst)
(if (eq? lst null)
0
(+ 1 (len(cdr lst)))
))
1.) create a .vimrc file if none exists
https://stackoverflow.com/~/10921485
2.) install pathogen
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
# ------------------------------------[FILTERS]-------------------------------------
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0
1.) Open your current Firefox Profile folder
a.) On the Firefox address bar type about:support
b.) Folder path is in “Profile Folder” section, use that and navigate to it
2.) create a folder called chrome
3.) go into created folder and create a userChrome.css file
4.) In userChrome.css paste in code from:
(use the gist snippet below)
5.) activate custom stylesheets in Firefox: