Code Monkey home page Code Monkey logo

biscuits's Introduction

Biscuits-Banner

Biscuits

Bites of practice to have with your coffee in the morning.

Table of Contents

  1. About
  2. Setup
  3. Usage
  4. Contributing
## About The purpose of this repo is to make practicing simple. Biscuits provides interview-style questions in the comfort of your terminal/text editor. No more hunting down interview questions or finagling with slow web IDEs. Just set everything up with `npm run setup`, hit `npm start` and start practicing.

On Testing: In order to practice coming up with your own test cases, Biscuits recommends that you write your own tests. To encourage this, a bare-bones test template is provided for you in the home directory. However, you can run npm start -- spec to preload some tests for your prompt if you wish to work with them.

## Setup `npm run setup`

An interactive shell will prompt you for your editor of choice, set up a remote upstream and run npm install for you.

  1. npm install
  2. For random-prompt functionality: brew install coreutils. Biscuits uses GNU's shuf command.
  3. Specify your editor using npm config set biscuits:editor EDITORCOMMAND. E.g: subl or atom. By default, it is vim.
## Using Biscuits 1. `npm start` to work on a random prompt. 2. `npm start -- spec` will pre-load any prewritten tests for a chosen prompt before you start. 3. Write your tests in the test/ directory. Remember you have a template in the home directory if you need it. 4. The tests should require a `solution.js` in each prompt folder. Each test should be named after its prompt. 5. `npm test` to run all tests. 6. `npm run reset` to remove all solution files and test files, and retrieve prompts. 7. `npm run update` will update Biscuits by `stash`ing any unstaged changes, performing a `pull --rebase` to upstream, and reapplying stashed changes. **Remember to update before using.** 7. `npm run reprompt` to retrieve prompt files. *NOTE: `solution.js` is included in .gitignore file. To save solutions, comment or remove this line.* ## Contributing *IMPORTANT: Please create a new branch for each new pull request you submit and submit it to the master branch*
  1. New prompts should be in their own folder in the prompts/ directory.
  2. The prompt itself should be in a .js file named prompt.js. The function should be exported via CommonJS for testing purposes.
  3. Write tests for a particular prompt in the spec/ directory

biscuits's People

Contributors

banunatina avatar tlevin avatar yilenpan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

biscuits's Issues

Error on running npm start

I get the following error when I run npm start:

[9] โ†’ npm start
.start-script: line 3: gshuf: command not found
cp: ./prompts//prompt.js: No such file or directory
mv: rename ./prompts//prompt.js to ./prompts//.prompt.js: No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.