# Computers

## set PYTHONPATH for npm

```
npm config set python /usr/bin/python3
```

<https://www.npmjs.com/package/node-gyp>

## [Deploying a Shiny app as a desktop application with Electron](https://www.travishinkelman.com/post/deploy-shiny-electron/)

* Read this [post](https://www.travishinkelman.com/post/deploy-shiny-electron/)
* Clone this repository [R Shiny Electron](https://github.com/dirkschumacher/r-shiny-electron)$RSE$ template
* install Electron

```
npm install -g electron
```

* install Electron Forge

```
npm install -g electron-forge
```

* open folder with terminal

```
cd r-shiny-electron-master
```

* npm install

```
npm install
```

* install local R

update R version in `get-r-mac.sh` file

```
./get-r-mac.sh
```

* install packages

```
Rscript add-cran-binary-pkgs.R
```

* run app

```
npm start
```

* make package

```
electron-forge package
```

* make portable app

```
electron-forge make
```

## [Adding an existing project to GitHub using the command line](https://www.softwarelab.it/2018/10/12/adding-an-existing-project-to-github-using-the-command-line/)

<https://www.softwarelab.it/2018/10/12/adding-an-existing-project-to-github-using-the-command-line/>

```
git init
```

```
git add .
```

```
git commit -m "initial commit"
```

```
git remote add origin <remote repository URL>
```

```
git remote -v
```

```
git push -f origin master
```

## md2googleslides -- Markdown to Google Slides

<https://github.com/gsuitedevs/md2googleslides>

```
npm install -g md2gslides
```

```
md2gslides slides.md
```

## slidex

Convert PowerPoint Slides to xaringan $remark.js$ Slides

<https://github.com/datalorax/slidex>

## Change Key - Mouse Functions

* [Introduction to AppleScript Language Guide](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html)
* [Automator User Guide](https://support.apple.com/guide/automator/welcome/mac)
* [keyboardmaestro](http://www.keyboardmaestro.com/main/)
* [Hammerspoon](http://www.hammerspoon.org/)
* [Karabiner](https://karabiner-elements.pqrs.org/)
* [phoenix](https://github.com/kasper/phoenix)
* [AutoHotkey](https://github.com/Lexikos/AutoHotkey_L)

## Virtual Machines

* [Azure Virtual Machines](https://azure.microsoft.com/en-gb/free/virtual-machines/?cdn=disable)
* [Compute Engine](https://cloud.google.com/compute)

## Regular Expressions

<https://regex101.com/>{target="\_blank"}
