Skip to content

Instantly share code, notes, and snippets.

View olleolleolle's full-sized avatar
🙌
In sunny Malmö in Sweden 🌞

Olle Jonsson olleolleolle

🙌
In sunny Malmö in Sweden 🌞
View GitHub Profile
@olleolleolle
olleolleolle / adding_compilefile_command.diff
Created March 1, 2009 22:23
here is a weird idea added to Bespin
diff -r ff80ef4e11e9 backend/python/bespin/controllers.py
--- a/backend/python/bespin/controllers.py Sun Mar 01 19:42:53 2009 +0100
+++ b/backend/python/bespin/controllers.py Sun Mar 01 23:22:44 2009 +0100
@@ -191,6 +191,18 @@
fm.close(user, project, path)
return response()
+
+@expose(r'^/file/compile/(?P<path>.*)$', 'POST')
+def compilefile(request, response):
@olleolleolle
olleolleolle / arduino_syntax_coloring.diff
Created March 1, 2009 17:48
Support for Arduino's syntax in Bespin (the Mozilla code editor).
diff -r 601a944a1639 frontend/js/bespin/bootstrap_dependencies.js
--- a/frontend/js/bespin/bootstrap_dependencies.js Sat Feb 28 22:26:57 2009 -0800
+++ b/frontend/js/bespin/bootstrap_dependencies.js Sun Mar 01 18:44:18 2009 +0100
@@ -59,6 +59,7 @@
dojo.require("bespin.syntax.css");
dojo.require("bespin.syntax.html");
dojo.require("bespin.syntax.php");
+dojo.require("bespin.syntax.arduino");
dojo.require("bespin.cmd.commandline");
@olleolleolle
olleolleolle / docs_in_events_js.diff
Created March 2, 2009 21:25
Small changes, fixing cut n paste errors.
diff -r a41a063efa69 frontend/js/bespin/events.js
--- a/frontend/js/bespin/events.js Mon Mar 02 21:55:02 2009 +0100
+++ b/frontend/js/bespin/events.js Mon Mar 02 22:25:11 2009 +0100
@@ -78,7 +78,7 @@
// ** {{{ Event: bespin:editor:config:run }}} **
//
-// Load the users config file
+// Load the user's config file
bespin.subscribe("bespin:editor:config:run", function(event) {
@olleolleolle
olleolleolle / bugfix_createproject.diff
Created March 2, 2009 21:34
on creating a project, the refresh of the project list is borked due to closure miss
diff -r a41a063efa69 frontend/js/bespin/dashboard/dashboard.js
--- a/frontend/js/bespin/dashboard/dashboard.js Mon Mar 02 21:55:02 2009 +0100
+++ b/frontend/js/bespin/dashboard/dashboard.js Mon Mar 02 22:33:42 2009 +0100
@@ -134,7 +134,7 @@
},
refreshProjects: function() {
- _server.list(null, null, displayProjects);
+ _server.list(null, null, bd.displayProjects);
}
diff --git a/jquery.jeditable.ajaxupload.js b/jquery.jeditable.ajaxupload.js
index a211183..bedafb7 100644
--- a/jquery.jeditable.ajaxupload.js
+++ b/jquery.jeditable.ajaxupload.js
@@ -44,7 +44,7 @@ $.editable.addInputType('ajaxupload', {
error: function (data, status, e) {
alert(e);
}
- })
+ });
javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=pl|sv&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&langpair=pl|sv&tbb=1&ie='+e;};
@olleolleolle
olleolleolle / index_action_and_filename_fix.diff
Created February 7, 2010 09:26
Making the example a little more understandable to the casual user.
diff --git a/exampleProject/views/simple.js b/exampleProject/views/simple.js
index 22e2b7e..6307b2c 100644
--- a/exampleProject/views/simple.js
+++ b/exampleProject/views/simple.js
@@ -4,15 +4,30 @@ var path = require('path');
var HTTP301MovedPermanently = require('bomberjs/lib/http_responses').HTTP301MovedPermanently;
+function htmlHead () {
+ return '<html><head><title>Bomber.js example app</title></head><body>';
ollebook:eos olle$ sudo juicer install jslint
Installing JsLint 1.0 in /Users/olle/.juicer/lib/jslint
Installing dependencies
Installing Rhino 1_7R2-RC1 in /Users/olle/.juicer/lib/rhino
Downloading ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2-RC1.zip
Downloading http://www.jslint.com/rhino/jslint.js
/Library/Ruby/Gems/1.8/gems/juicer-0.2.6/lib/juicer/install/jslint_installer.rb:31:in `install': undefined method `copy' for File:Class (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/juicer-0.2.6/lib/juicer/command/install.rb:47:in `execute'
from /Library/Ruby/Gems/1.8/gems/juicer-0.2.6/lib/juicer/command/install.rb:37:in `each'
from /Library/Ruby/Gems/1.8/gems/juicer-0.2.6/lib/juicer/command/install.rb:37:in `execute'
@olleolleolle
olleolleolle / autocomplete_bugfix.diff
Created February 15, 2010 09:03
adding the getImageAt interface method to the autocomplete results to shut errors up
Index: ide/src/extension/components/SeleniumIDEGenericAutoCompleteSearch.js
===================================================================
--- ide/src/extension/components/SeleniumIDEGenericAutoCompleteSearch.js (revision 8344)
+++ ide/src/extension/components/SeleniumIDEGenericAutoCompleteSearch.js (working copy)
@@ -77,6 +77,13 @@
getValueAt: function(index) {
return this.result[index][0];
},
+ /**
+ * Get the image for the result at the given index
@olleolleolle
olleolleolle / linted_the_browserbot.diff
Created February 15, 2010 18:10
general jslint work, surprise on #321
Index: common/src/js/core/scripts/selenium-browserbot.js
===================================================================
--- common/src/js/core/scripts/selenium-browserbot.js (revision 8354)
+++ common/src/js/core/scripts/selenium-browserbot.js (working copy)
@@ -100,9 +100,10 @@
};
this.isNewPageLoaded = function() {
+ var e;
if (this.pageLoadError) {