Since there still seem to be lots of JSFiddle widgets scattered in other workspaces,

Since there still seem to be lots of JSFiddle widgets scattered in other workspaces, here’s a video on how to port a widget to a Github project.
https://www.youtube.com/watch?v=IrotcJAcG2A

What happened to JSFiiddle to make this all necessary?

JSFiddle used to allow you to reference the final assembled HTML, JS, and CSS from a URL, which is how ChiliPeppr was all initially created. Each widget or element was a JSFiddle. Eventually Github was a safer approach, but then a nice editor was needed, and when Cloud9 appeared on the seen it provided an amazingly rich IDE. Most stuff has migrated over time, but much hasn’t either.

I think I’ve done this once or twice before?

@raykholo yes, you definitely have.

I have a question: I have forked a workspace on github, and when my workspace loads it the loader uses the geturl proxy. But this returns an old version of the file, only it I manually append ?forcerefresh=true then the current version is returned. If I remove forcerefresh=true then I’ll get the old version again.

http://i2dcui.appspot.com/geturl?url=http://raw.githubusercontent.com/ChristophPech/workspace-grbl1/master/auto-generated-workspace.html

http://i2dcui.appspot.com/geturl?url=http://raw.githubusercontent.com/ChristophPech/workspace-grbl1/master/auto-generated-workspace.html?forcerefresh=true

Both are different.
Is there any way to flush the proxy cache?

Ahh, I don’t see an ampersand. The easiest way to remember it for me is to put forcerefresh=true first and then the url second. Use this instead: http://i2dcui.appspot.com/geturl?forcerefresh=true&url=http://raw.githubusercontent.com/ChristophPech/workspace-grbl1/master/auto-generated-workspace.html
http://i2dcui.appspot.com/geturl?url=http://raw.githubusercontent.com/ChristophPech/workspace-grbl1/master/auto-generated-workspace.html?forcerefresh%3Dtrue

Ok, thanks, that works. I have to add it to my build script then.
Is there a reason for using this proxy at all? It takes about 200-300ms per file, opposed to raw.githubusercontent which is only this slow on the first request subsequent requests are cached about 50ms.

During development it is best to bypass the proxy. The chilipeppr.load() has hardcoded that if your main URL is served from cloud9 or jsfiddle to not load via geturl to bypass the proxy. I’m guessing you’re doing dev from your local computer so chilipeppr.load()'s hard code to bypass during dev is getting missed? I could go add a localhost as another part of the hardcode bypass list.

Yes, I am developing on localhost. To make that work I already have a modified app.js to bypass the proxy. But If I push my files to github I need to make sure I clear all the http://i2dcui.appspot.com/geturl? caches otherwise it will deliver the old versions of the files. It doesn’t seem to expire on its own.

Once you are back in your http://chilipeppr.com workspace and you pass in ?forcerefresh=true, it cascades to all chilipeppr.load() calls and all caches are refreshed. What I tend to see at that point is around 10% of the time we get a 500 internal server error from Github as it reloads EVERY file from there and Github seems to not like it. In those cases I just reload again with ?forcerefresh=true and it comes through. I also find that Github does do a delay of a minute or more on rawgithubcontent so I sometimes have to ?forcerefresh=true a few times to finally get the latest content.

Thanks, good to know. I tried that first but it didn’t work. Next time I’ll wait 5 minutes until github is up to date.