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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"version": 2, | |
"final_space": true, | |
"console_title_template": "{{ .Shell }} in {{ .Folder }}", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"segments": [ |
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
#!/bin/bash | |
# | |
# Script written by GPT-4 | |
# | |
# Description: | |
# This script generates commit message suggestions based on the staged git diff. | |
# It uses the OpenAI Chat API with the specified model to generate the suggestions, | |
# and outputs a list of recommended commit messages. The user can customize the | |
# model, maximum number of lines from the git diff, and whether to follow | |
# conventional commit message format. |
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
function* nums(n) { | |
yield n; | |
yield* nums(n + 1); | |
} | |
function* primes(seq) { | |
const prime = seq.next().value; | |
yield prime; | |
const nextSeq = function* () { |
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
#lang racket | |
(define TRUE (λ (x) (λ (y) x)) ) | |
(define FALSE (λ (x) (λ (y) y)) ) | |
(define ZERO (λ (f) (λ (a) a))) | |
(define ONE (λ (f) (λ (a) (f a)))) | |
(define TWO (λ (f) (λ (a) (f (f a))))) | |
(define THREE (λ (f) (λ (a) (f (f (f a)))))) | |
(define FIVE (λ (f) (λ (a) (f (f (f (f (f a)))))))) |
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
const ZERO = f => a => a; | |
const ONE = f => a => f(a); | |
const TWO = f => a => f(f(a)); | |
const THREE = f => a => f(f(f(a))); | |
const FIVE = f => a => f(f(f(f(f(a))))); | |
const SUCC = n => f => a => f(n(f)(a)); | |
const MULT = x => y => f => x(y(f)); |
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
curl -s https://gist.githubusercontent.com/keller/8589abe5431d62c6568e2af15414989a/raw/de15e6030a078dba18386dcb457e063e8d8e458f/fizzbuzz_min.js | node - |
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
//Lambda Calc JS | |
const TRUE = x => y => x; | |
const FALSE = x => y => y; | |
const ZERO = x => y => y; | |
const ONE = x => y => x(y); | |
const SUCC = n => x => y => x(n(x)(y)); | |
const MULT = x => y => z => x(y(z)); |
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
### Keybase proof | |
I hereby claim: | |
* I am keller on github. | |
* I am keller (https://keybase.io/keller) on keybase. | |
* I have a public key whose fingerprint is F7A9 B006 F1B7 C2DD FAEE 7DF6 33E0 2B67 721F F6D4 | |
To claim this, I am signing this object: |
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
/* naive implementation of useState and useEffect */ | |
let states = []; | |
let newStates; | |
let _render = () => {}; | |
let unsubs = []; | |
let deps = []; | |
let newDeps; |
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
import React, { Component } from "react"; | |
import { createContext } from "react-broadcast"; | |
const StoreContext = createContext(); | |
class Connected extends Component { | |
state = this.props.store.getState(); | |
componentDidMount() { | |
this.props.store.subscribe(() => { | |
this.setState(this.props.store.getState()); |
NewerOlder