This was rather annoying.....
defaults write com.apple.versioner.python Version 2.6
This was rather annoying.....
defaults write com.apple.versioner.python Version 2.6
| // Credit: based on code by John Resig. | |
| var startTime = new Date().getTime(); | |
| for (var iters = 0; timeElapsed < 1000; iters++) { | |
| // Run some test code here. | |
| timeElapsed = new Date().getTime() - startTime; | |
| } | |
| // iters = number of iterations achieved in 1000 milliseconds. |
| // Using Speakeasy | |
| //--------------------------------------------------// | |
| // Sentiment analysis | |
| var mood = require("speakeasy-nlp").sentiment; | |
| mood.analyze("I hate you"); //=> { score: -1, ..... } | |
| // Classifying statements | |
| var meaning = require("speakeasy-nlp").classify; | |
| meaning.classify("What is the meaning of life?") //==> |
| // found in lib/flatiron/plugins/http.js | |
| app.start = function (port, host, callback) { | |
| [... code ...] | |
| app.listen(port, host, callback); | |
| }; | |
| app.listen = function (port, host, callback) { |
| app.start(8080); | |
| var io = require('socket.io').listen(app.server); | |
| io.sockets.on('connection', function(socket) { | |
| socket.emit('news', { hello: 'world' }); | |
| socket.on('my other event', function(data) { | |
| console.log(data); | |
| }); | |
| }); |
| // Color Converter | |
| function convertMode (str, from, to) { | |
| var lex = [ | |
| 'bold', 'italic', 'underline', 'inverse', | |
| 'white', 'grey', 'black', | |
| 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow' | |
| ]; | |
| var styles = { |
| { | |
| location: [ { | |
| _id: '51a93bf0caf3b609bc00b6eef300097c', | |
| ctime: 1329683491400, | |
| mtime: 1329683491400, | |
| name: 'Dos Perros', | |
| address: '200 N. Mangum Durham, NC 27701', | |
| geolocation: [ 35.998389, -78.899839 ], | |
| pros: [], | |
| cons: [], |
| <ul> | |
| <li class="name"> | |
| [object Object],[object Object] | |
| </li> | |
| </ul> |
| warn: Creating new snapshot for version 0.1.0-5 | |
| info: Done creating snapshot 0.1.0-5 | |
| info: Updating application Tweetlibs | |
| info: Activating snapshot 0.1.0-5 for Tweetlibs | |
| info: Stopping app Tweetlibs | |
| info: App Tweetlibs is now stopped | |
| info: Starting app Tweetlibs | |
| error: Error running command deploy | |
| error: Nodejitsu Error (500): Internal Server Error | |
| error: There was an error while attempting to deploy your application. |
| // Inline Labels | |
| // -------------------------------------------------- // | |
| $('input, textarea').each(function() { | |
| var self = $(this), | |
| label = $("label[for='" + self.attr("id") + "']").text(); | |
| // Replace initial values | |
| if (!self.val().replace(/^\s+/g, "").length) { |