gratipay / grtp.co Goto Github PK
View Code? Open in Web Editor NEWGratipay Widgets + API
Home Page: https://grtp.co/
License: MIT License
Gratipay Widgets + API
Home Page: https://grtp.co/
License: MIT License
Requested by @mpirnat on Twitter:
Would love a widget that is flexible width that I could stick in a sidebar and have it scale
We're using one repo for all issues instead. We should move all issues over to gittip/www.gittip.com and turn off the issue tracker here.
I've never done a gttp.co deployment before. Time to figure this out and update the README.
I am just trying to copy my widgets from /lib to /www during deployment and test it. It doesn't work and I don't understand why the build system is so complicated. This is what happens when I run make test
:
[STDOUT] npm install
[INFO] Environment preparation done. Application grtp.co starting up…
[STDERR] npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.29","npm":"1.4.21"})
[STDOUT]
[STDOUT] > [email protected] install /app/node_modules/dalekjs/node_modules/dalek-browser-phantomjs/node_modules/phantomjs
[STDOUT] > node install.js
[STDOUT]
[STDERR] sh: 1: node: not found
[STDERR] npm WARN This failure might be due to the use of legacy binary "node"
[STDERR] npm WARN For further explanations, please read
[STDERR] /usr/share/doc/nodejs/README.Debian
[STDERR]
[STDERR] npm ERR! Error: ENOENT, lstat '/app/node_modules/dalekjs/node_modules/dalek-driver-native/node_modules/dalek-internal-webdriver/node_modules/wd/lib/asserters.js'
[STDERR] npm ERR! If you need help, you may report this *entire* log,
[STDERR] npm ERR! including the npm and node versions, at:
[STDERR] npm ERR! <http://github.com/npm/npm/issues>
[STDERR]
[STDERR] npm ERR! System Linux 3.10.0-123.9.3.el7.x86_64
[STDERR] npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
[STDERR] npm ERR! cwd /app
[STDERR] npm ERR! node -v v0.10.29
[STDERR] npm ERR! npm -v 1.4.21
[STDERR] npm ERR! path /app/node_modules/dalekjs/node_modules/dalek-driver-native/node_modules/dalek-internal-webdriver/node_modules/wd/lib/asserters.js
[STDERR] npm ERR! fstream_path /app/node_modules/dalekjs/node_modules/dalek-driver-native/node_modules/dalek-internal-webdriver/node_modules/wd/lib/asserters.js
[STDERR] npm ERR! fstream_type File
[STDERR] npm ERR! fstream_class FileWriter
[STDERR] npm ERR! code ENOENT
[STDERR] npm ERR! errno 34
[STDERR] npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
[STDERR] npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
[STDERR] npm ERR! [email protected] install: `node install.js`
[STDERR] npm ERR! Exit status 127
...
http://bitbucket.org/techtonik/discovery/raw/73f57e4804a8c37bf07492df51c9447711f7347a/web/gadgets/gratipay.xml - proof of concept
I don't have access to deploy code as described in https://github.com/gratipay/grtp.co#deployment
It looks like this also needs a version bump.
Since Gittip
is never defined now, it can't call Gittip.users.getPublic()
I need nginx
config to setup reproducible environment on my machine. @rummik @seanlinsley @whit537 - can you commit the config or link here, so I can commit it myself.
0.1.4 is live and it is now safe to announce Blogger gadgets support.
In lib/v1/api.js
, getPublic()
and getCharts()
are basically the same thing, with a single string changed. As more endpoints are added, this will only get more ridiculous. This should be separated out into a helper function of some sort. (There is a relevant comment with a TODO in the code).
Picking up from https://github.com/zetaweb/www.gittip.com/issues/577 now that we have a separate repo.
Username is mutable. We should use id instead since it's immutable.
Right now widgets are unable to easily access the Gittip
object as they're contained within an iframe. We should expose this within the iframe.
The idea is to let widgets call things like Gittip.users.getPublic()
and Gittip.users.getCharts()
(defined in: lib/v1/api.js#L26-L43) if they need to.
Reticketing from gratipay/gratipay.com#3160. We signed our certificates using SHA-1, which is on its way out. I've submitted a CSR for a new SHA-256-signed certificate. Once I have that in hand we'll need to install that on grtp.co.
People don't have time to follow, but they want to give their support to certain people. The $ value is not an indicator of popularity, but a number of supporters is.
We need a new cert that covers both gttp.co
and grtp.co
. Do we redirect to grtp.co
? We do that for www.gttp.co
.
While perusing gittip.com on my phone, I found the "who inspires you" search box to be a little frustrating due to the mobile browser's autocorrection attempts. Please consider turning it off by setting autocorrect="false" in the text input.
Example (and other things to consider disabling): http://davidwalsh.name/disable-autocorrect
Some of us can't read files from Illustrator, so it would be handy to have it in a form that is a little more widely readable.
We need to not be annoying like those ad tool-tips, but what about something along those lines that would show a little Gittip card?
We need to tell stories about people on Gittip, and I think we want to have those stories told on other sites rather than forcing them to be told on www.gittip.com itself. So let's have ways to connect back to Gittip in a thorough way.
ht @ikirigin, the idea is they would put this on their career page.
Hey there,
We have some good news! We are upgrading your Droplet to the latest version of our cloud, so we can bring you the latest features on the DigitalOcean platform.
This message is to inform you on December 30, 2014 between 12:30 and 18:30 UTC, your Droplet’s hypervisor will begin the migration process. During a period of approximately 6 hours all of the Droplets on the hypervisor where your Droplet resides will be migrated to a new host. We spread out the migrations to ensure that each runs in a timely manner and completes successfully.
When your Droplet is queued for migration it will be powered off and you can expect about 1 minute of downtime per GB of your Droplet’s disk size. We understand that you may be running services that are mission critical, so of course you have the option to upgrade your Droplet on your own at a time that is more convenient.
You can read more about how to complete this upgrade on your own by following the link below:
Once the upgrade is complete, please check that all your services are running as expected. If you have any issues please check your configuration as specific services you are running may need to be restarted.
Please feel free to reply to this email if you have any questions, and we’ll make sure this process is as simple as possible.
Thank you,
The DigitalOcean TeamAffected Droplets:
grtp.co
We've got reports of the widget breaking due to the rename: IRC.
Reticketed from #94 (comment).
We can link to grtp.co from gratipay.com with a ?username=foo
or whatevs to contextualize it for authenticated users.
Because 0.1.3 is already deployed in #83, we need to tag/push another release to make Blogger gadgets available. http://grtp.co/v1/ should show them.
I reloaded nginx
after deployment, and was looking how to add .md as a mime type and noticed that the front page is no longer served as .html - http://grtp.co/ - other page - http://grtp.co/v1/ work ok. It could be that I messed with config somehow, but I doubt it. Most likely the changes were there before, and I've just activated them with restart.
This is the config that is active - 2a1c1b5
/etc/nginx/nginx.conf
contains like default_type application/octet-stream;
, but the file last modified in Nov 28 2013. What is going on?
Current API mockups can't test redirects. We should add functionality for this
The idea: Include HTTP headers in the mock endpoint files, and send them along. This'll let us test redirects and such.
The @gittip guys should consider creating a widget with the text “Donate”. Gittip doesn’t mean anything to those unfamiliar with the brand
@loopj https://twitter.com/loopj/status/322441710401630208
@DeadWisdom started on this at the PyCon sprints. His AI file is in the root of this repo:
https://github.com/gittip/gttp.co/blob/00b79f1c0dc2ea0ce1d83fd00bb2fa65fe753adf/gittip-widget-3.ai
Look into using the SVG in the bottom-right corner of the widgets from https://github.com/duckinator/gittip-widget/blob/master/widget.css#L43 instead of the PNG as it is using now.
@tjvantoll via Twitter:
Gittip button doesn't have a type, so Enter keypresses in textboxes in IE click it!
Public information about how popular certain widgets/gadgets are, will be interesting for people to evaluate which platforms are more useful, which gadgets are more pleasing to people.
This will even allow to create widget design/popularity contest.
Ouch. I created a branch, but didn't checked it out before commit, so the change is already in master
.
Something like Gittip.users.getPublic([service, ]user, callback)
would be handy.
For implementing the modal (mentioned in gratipay/gratipay.com#1167) on pages (which we do not control) which run our widgets, we need a way to communicate information -- such as the size of the iframe's content -- from the iframe to the parent, and vice-versa.
The way I've seen this done previously is using the Window.postMessage API. Since the data is represented as a single string, the way I'd do it is by passing a serialized JSON object.
Something like the following, plus the corresponding code for receiving it and dispatching things to the correct functions:
function send (command, object) {
object['command'] = command;
parent.postMessage(JSON.stringify(object), '*');
}
var iframeWidth = magicToGetWidth();
var iframeHeight = magicToGetHeight();
send("resize", {width: iframeWidth, height: iframeHeight});
This may need AspenWeb/experimental-javascript-version#16
Pulled from gratipay/gratipay.com#1214.
@mpirnat began work on a fluid widget, way back in issue #8. I took that code and cleaned it up in duckinator/gittip-widget
Requirements:
<iframe>
can be a variable widthCurrently the existing widgets imply using js scripts which is not easy to include on many platforms due to rightful cross-scripting concerns.
So it would be nice to have a simple image link as those that you can find on github for various services (travice build test, etc...)
Google Web Fonts do not seem to be loading
I've been playing with Gulp for a while now, and really love its use of streams and support for incremental builds. Seems like it would be a great idea to switch over to reduce build times, and testing time.
Over the weekend I discovered Codenvy for testing grtp.co changes, and I found it awesome. Saving WIP here, as I am not sure if this is a valid Docker file yet.
# Base image from Codeny that can be pulled from Docker
# Hub. The shellinabox image provides core Linux utilities
# and terminal access to runner.
# http://github.com/codenvy/dockerfiles
FROM codenvy/shellinabox
# -- Port mapping config for container and Codenvy ---
# http://docs.codenvy.com/user/creating-custom-builder-runner-environments/#port-mapping
# Make port 80 accessible from outside
EXPOSe 80
# Show Codenvy IDE port to check to detect that web
# application is running and provide a link to it.
ENV CODENVY_APP_PORT_80_HTTP 80
# Port used by Codenvy IDE clients to connect to the
# debugger of your application within the Runner.
# Codenvy maps this port to the debugger console in
# the browser. You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8000_DEBUG 8000
#
# ENV CODENVY_APP_PORT_<port>_DEBUG <port>
# Set this value to the port of any terminals operating
# within your runner. If you inherit a base image from
# codenvy/shellinabox (or any of our images that inherit
# from it, you do not need to set this value. We already
# set it for you.
# ENV CODENVY_WEB_SHELL_PORT <port>
#
# The following is done by codenvy/shellbox base image
#EXPOSE 4200
#ENV CODENVY_WEB_SHELL_PORT 4200
# Execute your custom commands here. You can add
# as many RUN commands as you want. Combining
# RUN commands into a single entry will cause your
# environment to load faster. Also, building your image
# with docker offline and uploading it to Docker Hub
# as a pre-built base image will also cause it to load
# Faster.
#
# Adopted from https://github.com/codenvy/dockerfiles/blob/master/base/angular-yeoman/Dockerfile
RUN sudo apt-get update && \
sudo apt-get install -y nginx npm && \
sudo npm install -g grunt-cli
# Mount app as /app
VOLUME ["/app"]
ENV CODENVY_APP_BIND_DIR /app
# Build stuff
RUN cd /app && pwd && ls -la # make test
# Configure nginx to serve /app/www - change root and enable directory listing
# http://stackoverflow.com/questions/5955548/how-do-i-use-sed-to-change-my-configuration-files-with-flexible-keys-and-values
RUN sudo sed -i -e 's#root /var/www/html;#root /app/www;\n\tautoindex on;#' /etc/nginx/sites-enabled/default
# Include this as the CMD instruction in your Dockerfile if
# you'd like the runner to stay alive after your commands
# have finished executing. Keeping the runner alive is
# necessary if you'd like to terminal into the image. If
# your Dockerfile launches a server or daemon, like Tomcat,
# you do not need to set this value as Docker will not
# terminate until that process has finished.
#CMD sleep 365d
CMD cd /app && make test && sudo nginx -g 'daemon off;'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.