Code Monkey home page Code Monkey logo

ppaas's Introduction

PPaaS

Party Parrot as a Service

warning-parrot NOTICE warning-parrot

Since Heroku is deprecating their free tier, the API has been migrated to Vercel. The URL changed from https://ppaas.herokuapp.com to https://partyparrotasaservice.vercel.app/api (yes, including the /api part).

Sorry for the inconvenience. (But not quite, let's put all the blame on corporate)

PPaaS UI

You can use the PPaaS UI to create party parrots in a friendlier manner (see its GitHub repo).

Basic call

https://partyparrotasaservice.vercel.app/api/partyparrot

Party Parrot

Overlay

You can add an overlay that follows the parrot using the overlay query parameter:

https://partyparrotasaservice.vercel.app/api/partyparrot?overlay=http://i.imgur.com/QJ41dQb.png

Here is the result: Upvote Party Parrot

The image is not shown because it is too big and is not rendered in the canvas.

Overlay Parameters

To solve this problem, it is possible to adjust it the overlay with the following parameters:

  • overlayHeight
  • overlayWidth
  • overlayOffsetX
  • overlayOffsetY
  • flipOverlayY (doesn't seem to work at the moment)
  • flipOverlayX (doesn't seem to work at the moment)

https://partyparrotasaservice.vercel.app/api/partyparrot?overlay=http://i.imgur.com/QJ41dQb.png&overlayWidth=15&overlayHeight=15&overlayOffsetX=-7&overlayOffsetY=-3

Here is the result: Upvote Party Parrot

Delay

You can adjust the delay between frames using the delay query parameter:

https://partyparrotasaservice.vercel.app/api/partyparrot?delay=20

Here is the result: Fast Parrot

Colors

You can set the colors for each frame using the colors query parameter:

https://partyparrotasaservice.vercel.app/api/partyparrot/middleparrot?colors=00CCCC,00AAAA,008888,006666,004444&delay=50

Here is the result: Green-ish Middle Parrot

Base Parrot

You can change the base parrot using /partyparrot/:baseparrot.

The list of supported base parrots is in the baseparrots folder.

Note that the changing the base parrot also supports all the other parameters.

https://partyparrotasaservice.vercel.app/api/partyparrot/rightparrot

Here is the result: Right Parrot

For a bigger party:

https://partyparrotasaservice.vercel.app/api/partyparrot/mega?overlay=http://vignette3.wikia.nocookie.net/runescape2/images/0/0a/Wizard_hat_(t)_detail.png&overlayWidth=100&overlayHeight=100&overlayOffsetY=-150

Mega Wizard Parrot

https://partyparrotasaservice.vercel.app/api/baseparrots returns the list of available parrots.

Weird things

ppaas's People

Contributors

francoislg avatar msrose avatar omlahid avatar viyh avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

ppaas's Issues

Overlay images that have pure black values flicker white

When any transparency is set, whichever is the value, gifencoder will try to get the "closest" color to it from the gif bitmap. It sets "Pure black" as the transparent color. This results in overlay images that flicker white when they are only black and white.

Also happen with the (soon) new base parrot when the lines were pure black. I "fixed" it by replacing by hand "rgb(0,0,0)" to "rgb(1,1,1)"...

Somewhat related to this fix, since it is needed to make gifencoder work with transparency: eugeneware/gifencoder#5

Support gifs

Allows to import animated gifs and merge them

Following links on overlay image.

The willingness for the system to follow links when resolving overlay images allows for fairly simple and potent denial of service attacks.

For example, using a url shortener I was able to craft the following URL https://ppaas.herokuapp.com/partyparrot?overlay=https://tiny.cc/FaCzXsWad which hangs the API. Would be fairly easy to deny service completely with just a few calls to the server. The link in the overlay maps back to the full url.

Either redirects should never be followed, or the redirect needs to be checked for self reference.

Failure in `master` branch

Happens because the folder is named parrotconfigs when require() uses parrotConfigs (uppercase 'C').

Windows is fine, but Heroku is sad.

Will fix as soon as I have a little time.

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.