This file contains hidden or 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
import { objectivesStore, keyResultsStore, listOKRs, deleteOKR as deleteOKRMutation, updateOKR } from './stores/okrs.js' | |
import { teamStore, listTeams } from './stores/teams.js' | |
import { error } from './stores/errors.js' | |
import { memberStore, listMembers } from './stores/members.js' | |
import { fork, reject, parallel } from 'fluture' | |
import { onMount } from 'svelte' | |
import { pipe, head, filter, maybe, map, prop, sortBy } from './sanctuary.js' | |
let viewMode |
This file contains hidden or 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
import React, { useState, useEffect } from 'react'; | |
import * as S from 'sanctuary' | |
import {ul, li, a, div, input, button, pre, p} from 'react-hyperscript-helpers' | |
import axios from 'axios' | |
import $ from 'sanctuary-def' | |
const getResult = data => | |
S.fromMaybe ([]) (S.gets (S.is ($.Array ($.Object))) (["data", "hits"]) (data)) | |
const value = e => |
This file contains hidden or 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
const composeP = (...fns) => x => fns.reduceRight(async (v, f) => f(await v), x) | |
const db1 = () => Promise.reject('already in db').catch(e => console.error(e)) | |
const db2 = () => Promise.reject('already in db').catch(e => console.error(e)) | |
const db3 = () => Promise.reject('already in db').catch(e => console.error(e)) | |
const db4 = () => Promise.resolve('success, items has been saved') | |
const myPipeline = composeP( |
This file contains hidden or 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
const axios = require('axios') | |
const composeP = (...fns) => x => fns.reduceRight(async (v, f) => f(await v), x) | |
const user = { | |
name: 'Dimitri', | |
age: 35, | |
location: 'Berlin', | |
attributes: { | |
hair: 'grey', | |
eyes: 'green', |
This file contains hidden or 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
const arr = [1, 2, 3] | |
const sum = arr => | |
arr.length === 0 | |
? 0 | |
: arr[0] + sum(Array.prototype.slice.call(arr, 1)) | |
sum(arr) // 6 |
This file contains hidden or 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
## Some other goodies | |
# :e<space><CR> -> will reload the file you are working in. | |
# vmap -> is a mapping just for visual mode. That particular mapping is only valid in visual mode. | |
# nmap -> is a mapping for normal mode. Only available in normal mode. Recursive. It runs the mapped command from vim and the new command that is assigned together. | |
# nnoremap -> disables recursive key mapping for that map. | |
## Key comamnds | |
# <BS> Backspace | |
# <CR> Enter | |
# <Enter> Enter |
This file contains hidden or 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
const xs = [1, 2, 3, 4, 5] | |
const reverse = xs => | |
xs.reduceRight((a, c) => a.concat(c), []) | |
const head = xs => xs[0] | |
head( | |
reverse(xs) |
This file contains hidden or 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
const compose = (...fns) => x => fns.reduceRight((v, f) => f(v), x) | |
const useState = init => | |
([init, (init => | |
x => | |
useState(init + x))(init)]) | |
const createState = useState => | |
useState(3) |
-
Creates MyFeature branch off master. Do your work and then
$ git checkout -b myFeature master
-
Commit your changes to
myFeature
branch
$ git commit -am "Your message"
-
Now merge your changes to master without a fast-forward
$ git checkout master
$ git merge --no-ff myFeature