This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- [[ Cheatsheet for LUA from http://www.newthinktank.com/2015/06/learn-lua-one-video/]] | |
-- Prints to the screen (Can end with semicolon) | |
print("Hello World") | |
--[[ | |
Multiline comment | |
]] | |
-- Variable names can't start with a number, but can contain letters, numbers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
use std::fmt; | |
use std::io; | |
use std::num::ParseFloatError; | |
use std::rc::Rc; | |
/* | |
Types | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Emacs-SF - Additional Elisp related to 2021 March 5th Demo of (magit) transient by Mike Wright | |
;; in the following two examples, the call to invoke grep is replaced with a message displaying arguments instead. | |
;; 1 of 2 - the long way (18 non-blank lines of code) | |
(progn | |
(defun my-grep-function (&optional args) | |
(interactive | |
(list (transient-args 'my-grep-transient))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Elisp related to text-mode menu part of 2021 March 5 Emacs SF Dmenu Demo by Mike Wright | |
(progn | |
;; Creating a new menu pane in the menu bar to the right of “Tools” menu | |
(define-key-after | |
global-map | |
[menu-bar mymenu] | |
(cons "MyMenu" (make-sparse-keymap "mymenu mymenu")) | |
'tools ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Elisp related to 2021 March 5th Emacs-SF online Demo of (magit) transient by Mike Wright | |
;; from: https://github.com/magit/transient/blob/master/docs/transient.org | |
;; under section "Hydra" | |
;; A Hydra “body” is equivalent to a Transient “prefix” and a Hydra “head” is equivalent to a Transient “suffix”. | |
;; Hydra has no equivalent of a Transient “infix”. | |
(transient-define-prefix outline-navigate () | |
:transient-suffix 'transient--do-stay | |
:transient-non-suffix 'transient--do-warn | |
[("p" "previous visible heading" outline-previous-visible-heading) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; to show visual artifact when using darkburn, dimmer, and perspective packages | |
;; | |
;; run with: | |
;; # copy the my-init.el gist somewhere, e.g. ~/Downloads | |
;; mkdir ./target # or rm -rf ./target/* | |
;; cp my-init.el ./target | |
;; cd ./target | |
;; /usr/local/bin/emacs -q -l init.el --batch # ignore the ivy-switch-buffer warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/rust-lang/rust/issues/49733 | |
// https://doc.rust-lang.org/1.7.0/book/box-syntax-and-patterns.html | |
#![feature(box_syntax)] | |
#[derive(Debug)] | |
struct Bix(u8); | |
impl Bix { | |
pub fn new(x: u8) -> Self { | |
Bix(*box x) // for demo only, box serves no practical purpose here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
#[derive(Debug)] | |
pub struct Element { | |
pub a: u8, | |
} | |
#[derive(Debug)] | |
pub struct HSS { | |
pub store: HashMap<u32, Vec<Element>>, | |
} | |
fn main() { |
NewerOlder