View risp-2.0.rs
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 | |
*/ |
View demo-transient2.el
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))) |
View demo-tmm.el
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 ) |
View demo-transient.el
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) |
View my-init.el
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 |
View main.rs
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 |
View main.rs
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() { |
View Install-Docker-on-Linux-Mint.sh
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
# Check that HTTPS transport is available to APT | |
if [ ! -e /usr/lib/apt/methods/https ]; then | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https | |
fi | |
# Add the repository to your APT sources | |
sudo echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list | |
# Then import the repository key |
NewerOlder