Skip to content

Instantly share code, notes, and snippets.

View DoctorRyner's full-sized avatar
🏠
Working from home

Rainer Reinhardt DoctorRyner

🏠
Working from home
View GitHub Profile
{"lastUpload":"2022-03-13T12:28:19.824Z","extensionVersion":"v3.4.3"}
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
export const thunkSendMessage = (
message: string
): ThunkAction<void, StoreState, unknown, Redux.Action<string>> => async dispatch => {
const asyncResp = await exampleAPI()
console.log ("WHY CAN'T I SEE THIS???")
SetInput (dispatch) (message)
}
const
mkEvent = <ActionType> (action: ActionType) => (dispatch: Dispatch<ActionType>) => () => dispatch (action)
, mkEventF = <A, ActionType> (f: (x: A) => ActionType) => (dispatch: Dispatch<ActionType>) => (x: A) => dispatch (f (x))
-- Something like this
$(gen "position" ''Mesh ''V3)
-- Should generate that
getPosition :: Mesh -> JSM V3
getPosition = get "position"
setPosition :: V3 -> Mesh -> JSM ()
setPosition = set "position"
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
[options]
colorscheme = "one"
module Babylon.Data.V where
import Data.Aeson
import GHC.Generics
import JS
data V2 = V2 { x, y :: Float } deriving (Show, Generic)
instance ToJSVal V2 where
toJSVal v = newb "Vector2" [v.x, v.y]
@DoctorRyner
DoctorRyner / Main.lua
Created January 17, 2020 16:44
Optional type test
local ____modules = {}
local ____moduleCache = {}
local ____originalRequire = require
local function require(file)
if ____moduleCache[file] then
return ____moduleCache[file]
end
if ____modules[file] then
____moduleCache[file] = ____modules[file]()
@DoctorRyner
DoctorRyner / Main.lua
Created January 17, 2020 16:40
main = log $ show 0
local ____modules = {}
local ____moduleCache = {}
local ____originalRequire = require
local function require(file)
if ____moduleCache[file] then
return ____moduleCache[file]
end
if ____modules[file] then
____moduleCache[file] = ____modules[file]()
@DoctorRyner
DoctorRyner / init.toml
Last active October 1, 2019 21:08
SpaceVim Config
# ~/.SpaceVim.d/init.toml
# All SpaceVim option below [option] section
[options]
# set spacevim theme. by default colorscheme layer is not loaded,
# if you want to use more colorscheme, please load the colorscheme
# layer
colorscheme = 'one'
colorscheme_bg = 'dark'
# Disable guicolors in basic mode, many terminal do not support 24bit