GithubHelp home page GithubHelp logo

plunk's Introduction

A tiny utility to post current directory contents to http://plnkr.co/edit

Usage

  1. Go the the dir you want to plunk.
  2. Run plunk

Or run plunk --dir path/to/dir --des "A string describing the plunk" --tags "comma,separated,tags".

Authorized usage

To submit plunks under your user and to update them, you need to be authorized.

For that:

  1. Sign in to http://plnkr.co with Github (button in the right-upper corner of http://plnkr.co/)
  2. In browser developer console run: document.cookie.match(/plnk_session=(\w+)/)[1]
  3. Create ~/.plunk_config.json with the content { "auth": { "id": "..." } }, where ... means the output of step 2.

This will save an authorized session which the utility will use.

An example of .plunk_config.json:

{
  "auth": { "id": "56224aba860eabcdef869189" }
}

Now use it normally.

Exclusions:

  • Ignores files starting with a dot '.'

Gotchas:

  • Saves current plunk metadata in the file .plunk, uses it to update the plunk properly.
  • A once-created plunk is bound to its directory name. When you copy it into a new directory (or rename), plunk will create a brand-new plunk. I found this behavior helpful, because when I clone an existing directory into a new example, it makes me sure I will not overwrite an existing plunk.
  • The --tags flag only works when creating a new plunk, not updating an existing one

plunk's People

Contributors

iliakan avatar jdgarvey avatar halcyon avatar ggoodman avatar pmcdowell-okta avatar

Watchers

James Cloos avatar

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.