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
// 1. npm init | |
// 2. npm install -save openai simple-git | |
// 3. Grab an API key from OpenAI: https://beta.openai.com/account/api-keys | |
// 4. Replace FOLDER_TO_CHECK with the root path of your git-enabled project | |
// | |
// Eventually the goal of this is to have a command line utility that lets users | |
// generates the commit message and commit immediately. | |
const { Configuration, OpenAIApi } = require("openai"); | |
const simpleGit = require('simple-git'); |
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
-- This is just a really basic bin packer that does not allow for automatic resizing (yet)! | |
-- See: https://codeincomplete.com/articles/bin-packing/ | |
module BinPack exposing (..) | |
import Dict exposing (Dict) | |
import List.Extra exposing (..) | |
import Maybe.Extra exposing (..) |
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
/* | |
* I'm sure there's a better way to do this, but this solution works for me. | |
* Recursively copies a directory + subdirectories into a target directory. | |
* There's also no error handling. Have fun. | |
*/ | |
import 'dart:io'; | |
import 'package:path/path.dart' as p; | |
Future<void> copyDirectory(Directory source, Directory destination) async { |
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
/* | |
* I'm sure there's a better way to do this, but this solution works for me. | |
* Recursively copies a directory + subdirectories into a target directory. | |
* You may want to replace calls to sync() with Futures. There's also no error handling. Have fun. | |
*/ | |
import 'dart:io'; | |
import 'package:path/path.dart' as path; | |
void copyDirectory(Directory source, Directory destination) => |