Skip to content

Instantly share code, notes, and snippets.

View Metaxal's full-sized avatar

Laurent Orseau Metaxal

  • Google DeepMind
  • London, UK
View GitHub Profile
@Metaxal
Metaxal / clipboard->text+url.rkt
Last active February 1, 2021 13:40
Copy some hyperlinked text into the clipboard, then use this script to output both the text and the url.
#lang racket/base
(require quickscript
racket/class
racket/list
racket/gui/base)
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
@Metaxal
Metaxal / paint.rkt
Last active October 25, 2020 08:52
A very simple painting program
#lang racket
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require racket/gui/base
pict)
(define line-width-init 1)
@Metaxal
Metaxal / rename-file.rkt
Last active February 1, 2021 13:36
A quickscript to rename the current tab file (like Save as but also deletes the original file)
#lang racket/base
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require quickscript
racket/class)
(script-help-string "Like 'Save as…' but also deletes the original file (unless cancelled)")
@Metaxal
Metaxal / interactions2pdf.rkt
Last active February 1, 2021 13:37
Save interactions to pdf
#lang racket/base
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require quickscript
racket/class)
(script-help-string "Saves the interactions to a pdf file")
@Metaxal
Metaxal / move-line.rkt
Last active February 1, 2021 13:38
A quickscript to move the current line up or down
#lang racket/base
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require quickscript
racket/class)
(define-script move-line-up
#:label "move-line-up"
@Metaxal
Metaxal / struct-with-dict-construction.rkt
Last active August 28, 2020 09:18
Struct construction using dictionaries
#lang racket/base
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require racket/list)
(define mstructs (make-hasheq))
;; mstruct's can be used just like normal structs, but can also use the nicer `construct` constructor.
@Metaxal
Metaxal / keybindings.rkt
Last active August 3, 2020 17:35
A quickscript to show the active keybindings
#lang racket/gui
;;; License: MIT/Apache2
(require quickscript
search-list-box)
(script-help-string "Show active keybindings")
(define-script keybindings
@Metaxal
Metaxal / open-recent.rkt
Last active March 31, 2022 12:09
A quickscript to open a recent file via a search-list-box for easier retrieval
#lang racket/base
(require racket/gui/base
racket/class
racket/list
quickscript
quickscript/utils
framework
search-list-box)
@Metaxal
Metaxal / defines.rkt
Last active July 17, 2020 13:20
A quickscript to list and search the top level definitions
#lang racket/base
;;;; License: MIT/Apache2.0
(require quickscript
racket/gui/base
racket/class
racket/list
racket/match
racket/string
@Metaxal
Metaxal / show-highlighted.rkt
Created July 13, 2020 15:26
quickscript: simply displays the highlighted text "flashing" 5 times in a World-window in random colors
#lang racket/base
;;; From: https://github.com/Quickscript-Competiton/July2020entries/issues/9
;;; License: Apache 2/MIT
#|
My first submitted Racket Quickscript
(mostly a proof-of-concept, to try my hand at writing these)