Skip to content

Instantly share code, notes, and snippets.

Avatar

Donald Pinckney donald-pinckney

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am donald-pinckney on github.
  • I am donaldpinckney (https://keybase.io/donaldpinckney) on keybase.
  • I have a public key ASBK2HEXJmXWh60lUd310Yhn_k9ATG3sdgRKvZAaJ5qzjAo

To claim this, I am signing this object:

@donald-pinckney
donald-pinckney / index.js
Created Mar 26, 2019
JavaScript Wrapper Code
View index.js
const f = require('./function.js');
exports.gcf_main = function gcf_main(req, res) {
res.send(f.hello(req.body));
}
@donald-pinckney
donald-pinckney / function.idr
Created Mar 26, 2019
Idris Function Exported to JavaScript
View function.idr
module MyFunction
export -- This is new
hello : String -> String
hello req = "Hello: " ++ req
-- This is all new
lib : FFI_Export FFI_JS "" []
lib =
Fun hello "hello" $
@donald-pinckney
donald-pinckney / function.idr
Last active Mar 26, 2019
Simple Hello World Idris Function
View function.idr
module MyFunction
hello : String -> String
hello req = "Hello: " ++ req
@donald-pinckney
donald-pinckney / idris-vscode-setup.md
Created Jan 3, 2019
Idris Visual Studio Code Setup
View idris-vscode-setup.md

To setup Idris with Visual Studio Code:

  1. Install Idris, clearly: https://www.idris-lang.org
  2. Follow the directions to install vscode-idris: https://github.com/zjhmale/vscode-idris
  3. In Visual Studio Code settings, set the executable path of Idris (obtained by which idris), and turn on Show Output When Typechecking
  4. In Visual Studio Code Keyboard Shortcuts menu, open keybindings.json, and add the following:
{
 "key": "ctrl+alt+c",
@donald-pinckney
donald-pinckney / create_repo.sh
Created Apr 22, 2018
Create repo and push to GitHub
View create_repo.sh
#!/bin/bash
token=$GITHUB_SCRIPT_TOKEN
private=true
has_issues=true
has_projects=true
has_wiki=true
otherData=""
shouldPush=1