Based on http://paulbourke.net/fractals/clifford/
See the source typescript.
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>JS1k</title> | |
| <meta charset="utf-8" /> | |
| </head> | |
| <body> | |
| <canvas id="c"></canvas> | |
| <script> | |
| var b = document.body; |
Based on http://paulbourke.net/fractals/clifford/
See the source typescript.
| App.ApplicationRoute = Em.Route.extend({ | |
| actions: { | |
| open: function(tweet) { | |
| var handle, url; | |
| handle = tweet.account.screen_name; | |
| url = "https://twitter.com/" + handle + "/status/" + tweet.tweet_id; | |
| return window.open(url, '_blank'); | |
| } | |
| } | |
| }); |
| // Load the light version of all subjects on page load | |
| App.ApplicationController = Em.Controller.extend({ | |
| init: function() { | |
| return App.Subject.find(); | |
| } | |
| }); | |
| // Fetch all our previously loaded subjects | |
| App.SubjectsRoute = Ember.Route.extend({ | |
| model: function() { |
| rails new assets_test -O -T --skip-keeps | |
| cd assets_test | |
| echo "\ngem 'ember-rails'" >> Gemfile | |
| echo "\nAssetsTest::Application.config.ember.variant = :development" >> config/application.rb | |
| bundle | |
| rails r "puts Rails.application.config.assets.paths" |
| class BrainFuck | |
| def initialize code | |
| @code = code.gsub(/[^<>\[\]\+\-\.,]+/, "") | |
| end | |
| def run code | |
| code = @code.split "" | |
| tape = [] | |
| c = t = 0 |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>JS1k</title> | |
| <meta charset="utf-8" /> | |
| </head> | |
| <body> | |
| <canvas id="c"></canvas> | |
| <script> | |
| var b = document.body; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
| <title>OMG Circles!</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script> | |
| <style type="text/css"> | |
| body { | |
| background: #222; |
| //Arthur Gunn 2007, [email protected] | |
| package nz.co.gunn.colour { | |
| public class Colour { | |
| public function Colour () {}; | |
| public static function getColourString (colour:uint):String { | |
| var string:String = colour.toString(16); | |
| while (string.length < 6) string = 0+string; | |
| return string; | |
| }; | |
| public static function colourFromRGB (rgb:RGB):uint { |
| = label_tag "#{field.abstract_model.to_param}_#{field.name}", field.label | |
| .input | |
| - if field.bindings[:object].send("#{field.name}_url") | |
| .row | |
| = link_to field.bindings[:object].send("#{field.name}_url") | |
| %br | |
| = form.check_box "remove_#{field.name}" | |
| = form.label "remove_#{field.name}", "Remove existing #{field.label.downcase}", class: "inline" | |
| .row | |
| = form.file_field field.name, class: "fileUploadField #{field.has_errors? ? "errorField" : nil}" |