This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| svgEditor.setConfig({ | |
| dimensions: [400, 300], | |
| canvas_expansion: 1, | |
| show_outside_canvas:false, | |
| iconsize: 'l', | |
| //load the background here to start. | |
| bkgd_url:"http://www.babble.com/CS/blogs/strollerderby/2008/11/01-07/coffee.jpg", | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| svgEditor.setConfig({ | |
| dimensions: [400, 300], | |
| canvas_expansion: 1, | |
| show_outside_canvas:false, | |
| iconsize: 'l', | |
| //load the background here to start. | |
| bkgd_url:"http://some-url.png", | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*remove un-used features here and clean up the UI */ | |
| #copyright, #tool_wireframe, li#tool_clear, li#tool_open, li#tool_export, #tool_docprops, li#tool_import, | |
| #tool_image, #tool_path{ | |
| display:none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Blocky('http://hackazach.net' ,'funfun', {cell_size:11, scriptheme:'watermelon'}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.2.2/underscore-min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| album1 = {artist:"Sonic Youth" , album:'Dirty'} | |
| album2 = {artist:"Cher" , album: 'blah'} | |
| album3 = {artist:"Silverchair", album:'Frog Stomp'} | |
| albums = [album1 , album2, album3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var RoundButton = function(radius, label, action) { | |
| this.radius = radius; | |
| this.label = label; | |
| this.action = action; | |
| this.StuffSp = 'hoho'; | |
| }; | |
| var someStuff = function(){ | |
| if(this.hasOwnProperty('StuffSpace')){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Add the following lines to theme's html code right before </head> --> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
| <!-- | |
| Usage: just add <div class="gist">[gist URL]</div> | |
| Example: <div class="gist">https://gist.github.com/1395926</div> | |
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Make sure to namespace stuff :) | |
| window.Poc = window.Poc || {}; | |
| window.Poc.Models = window.Poc.Models || {}; | |
| window.Poc.Collections = window.Poc.Collections || {}; | |
| window.Poc.Views = window.Poc.Views || {}; | |
| window.Poc.Dispatcher = {}; | |
| /****************************** | |
| ****** Backbone Objects ****** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BBView = Backbone.View.extend({ | |
| el: '#some-selector', | |
| attributes: function () { | |
| return { | |
| name: this.nameField.val(), | |
| email: this.emailField.val(), | |
| password: this.passwordField.val(), | |
| password_confirmation: this.passwordConfirmationField.val() | |
| }; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lines = File.new('gettys').gets | |
| lineno = 0 | |
| short = {0=>[]} | |
| lines.split(' ').each do |word| | |
| #count up the present line and include spaces. Take into account the current space count | |
| #and the impact of adding the new word + 1 space. | |
| if ( ( (short[lineno].inject(0){|sum, ele| sum+=ele.size} ) + (word.size+1 + (short[lineno].count-1)) ) <= 13) | |
| short[lineno] = short[lineno].push word | |
| else | |
| lineno+=1 |
OlderNewer