JackHQ

Posts tagged coffeescript

6 notes

Cloud9 IDE -> 0 to CODE in 5 minutes

Cloud9 IDE -> 0 to NODE in 5 minutes

  • Build and deploy end to end Javascript Applications
  • Cloud9IDE is an online application development environment.

“Development as a Service”, it is free to get started and open-source. If you are constantly on the go or want to start learning NodeJs, Sproutcore, CoffeeScript, and other new javascript technologies, but don’t have the time to setup your system. Well you are out of excuses, with Cloud9IDE all you need to do is signup, clone a template and you are up and going.

Using Windows?

Node runs great on windows, but the package manager is not quite ready yet, but don’t let that stop you from learning these new technologies.

Watch this quick presentation, no how painlessly simple it is to signup, clone a template and run a development environment.

Got Heroku?

Then you can deploy straight from Cloud9 as well. You don’t have to worry how to configure your system with:

  • node
  • npm
  • coffeescript

etc.

It is not any easier to get started writing and deploying full stack web applications.

Give it a try!

Filed under nodejs coffeescript sproutcore cloud9ide

0 notes

Awesome CoffeeScript Idioms - Each, Map, Select, and Include

Languages like Python and Ruby have great built in idioms for collection management. JavaScript has some great libraries that also provide support for these idioms, like Underscore.js and JQuery

With CoffeeScript, you can take advantage of comprehensions, and quickly build these idioms with no additional libraries. These idioms were pointed out in “The Little Book on CoffeeScript” by Alex MacCaw or (@maccman). This book is a must read, if you are using coffeescript.

http://gist.github.com/1116813

http://arcturo.github.com/library/coffeescript/04_idioms.html

Filed under coffeescript

2 notes

Convert JavaScript to CoffeeScript

Rico Sta. Cruz created an awesome converter js2coffee. If you are planning to get into CoffeeScript, you have to check this page out.

http://ricostacruz.com/js2coffee

It will not craft CoffeeScript as well as if you did it by hand, but it is great to take some existing javascript and paste it in and see how it renders the CoffeeScript.

I just went over the https://github.com/visionmedia and grabbed the javascript from “node-growl” js file and pasted it in the javascript editor at js2coffee. It converted it to CoffeeScript and the generated CoffeeScript code was functional and compiled back into JavaScript!

Fun Stuff!

Filed under JavaScript coffeescript rubyonrails

8 notes

CupCake - A #CoffeeScript #NodeJs App Generator

Check out CupCake

Install

npm install cupcake -g

Usage

cupcake my_awesome_app

Source

https://github.com/twilson63/cupcake

                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                 '+:`                                                                          
                                                                 '',;;`                                                                        
                                                                  ,  .:`                                                                       
                                                                      :;                                                                       
                                                                       ;.                                                                      
                                                                       :;;'';,````                                                             
                                                                    .;+++;;;,`.,,,,.                                                           
                                                                  `,:;''++',:;';'';;,                                                          
                                                                 `.::;;;:,:;''''''''',                                                         
                                                               `,:;'';;;;'''++''+''''',                                                        
                                                              .:';;''''++''+:,:;'''''';`                                                       
                                                             .;;';;;'++''';::::;''+++'':                                                       
                                                            `;;''';;:::::::::;;'+++++'';                                                       
                                                            :;'''''';:::;;''''+++++++'';`                                                      
                                                        `.:.;;'''''''+++++++#+++++++++';.                                                      
                                                  ````;;';,,;;''+++++##++++++###+++++'';,                                                      
                                              .,,,.....;;:;:;'''+++++##++++#++++++++''';:                                                      
                                             `````..`...   ;:''++++#+#++#+++++'++++++'';:                                                      
                                             ````......    :;'''++++#+#++##'+;'+++++''';:                                                      
                                                `     `    .;''''++++#+++++';''++++'''';:                                                      
                                               ````     ````'',;++++++++++'+''++++'''''':.``                                                   
                                  `.       `....,:;.`        ```.++'+++++'+':..,;+'+'':;..````                                                 
                                  `       ..:;:;:...          ````.+'''';,..`````````....````` `                                               
                                         .,,..`..`              ````,,....``````````````````````                                               
                                         ,....`                   `````   ``` ````````    `   ` `                                              
                                         `.`                           ``     `  ``               `                                            
                                                                             ``  ` `                                                           
                                                                          `..``  ``                                                            
                            `                                                      `      `            `                                       
                           ..                                                       `     ``            ``      ``                             
                           :`   `                              `..``            `    `   `````         `...     ``.                            
                         `..``                                 .`........  `    ```       ` ```         ``,.    ```..                          
                        ..`.`   `                              `...```.....      ``````` `` `` `         .`,.     ```.                         
                       ,,..,                                   `,:::,...,,.`      ...````     `           ,`,. `    `.                         
                       :..;`    `                         .`        ``.,,.``         ````    `` `          .,,.`                               
                       ..,      `     `,,               `:;`                                    ```        `..`,                               
                                      ::`               ::`.                                    ```       `  ````        ::                    
                                    `.::               ::`.                                  ``````        `  ``          ,.                   
                            `  ` `  `;:``            `:,```                                   ````` `        ` .``  `    `.,                   
                           .`   ``  ,,.`     `     `::,``                                    `````` `      ``   ``         .,                  
                          ``   ` ```.``      `    ,::``                                `  ` ``````` ` `    `         `      :.                 
                         `.,      ``         ````:,.`.                                `   `````````` `     ``        ``     .;`                
                ,,      `..    ``````          ``,,..`                 `            ```` `````````          ``  `    ``     ```                
               `::,     ```      `````          `...```               .,`          ``````````````  ,;,       `` `     `      ```               
               `:::`            ````````         `..````              ...        ``````````````````.,::     ``        `      ``` .             
               .`:::      ` `  ``````````         ```````             ...      `````````````````` `..,:,`   ```       ``     ``` ...           
              , `,::`     `    ```````````          ``.````````      ``,,.   ```````````````````    ...,::.``         ``     ``  ...,`         
              `  `,:     `   `  ````````````         `...````````` ````,,,` ``````````````````` `   `..`.,::,`` `     ```    ``  `,,,,         
              `.  ;`,`  `` `` ````````````````        `......```.``````.,:,``````````````````         `..`.;;:` `     `` `  ```   ` `.         
                  ..`  `` ````` `````````````````      ``......`...``....:,,```..```````````              ``.:` `     ```   ```    ```         
                              `  ```````````````````     `...............::,.`````.``````                ` ```  `     ``    ```                
                              `   ```````````````````.`    ``.,...........,,````..`````````               ````` `     ``    ```    ``          
                         `         ````````````````..``..``````........```````...`````````               ````````    ```    ``` `              
                `        ``    ` `   ``````````````:,.``.........`.............``````````               ````` ``     ```    ``` ``             
                          `       ``   ```````````,::. `````````.`.......,...````````` `               `````` ``     ```   ``` ```             
                 `         ` ` `.  ````   ````````.:;;,````````````````......``````````               ``````````    ````    `` ````            
       `                    `  ,,,    ` ` `  `````.,:;:,``````````````````.``````  ``` `            ```````````     ````   ``````  ``  `       
      ;.``        `          ` .,,.      ``````  `..,:;::```````````````````````   `               ```````````      ````   `````````  ` :      
     ;:,,,,.    ` ``          ``,,,,`    `````` ````.,:;.`````````````````````                    ````````````     `````  `````````````+'`     
     '..,,,,,.  ` ```          `.,,,,`    `````` ````.,...`````````````````                     `````````````     ``````  ````````````++#`     
     ; `.,,,,,.`` ````          `.,,,,`  ````````   ``.,.``````````` ` `                      ``````````````      ``````  `````````` ;++++     
    ';   `.,.,.``` `````         `.,:`.`     ``  ..`  ````      ```                         ```````````````      ``````  ```````` ```+'##+`    
    '#    `.,``  `  ``````        ``.`.``   ` ```  ``..````  ` `                         `````````````````       ``````  ````` ``  `;+++++     
   :'+      `.   ``  ````````       ``           ```     ``                          ````````````````````       ``````` ````````````'++++++    
   :#'            ``  ``````````                                                  ``````````````````````       ``````` `````````  `,'++'+''.   
   ,+'.           ```````````...```                                          ``````````````````````````       ```````  ````````   .##'+++''    
    :''             `````````..`....````                                ````````````````````````````` `      ```````  `````````` `'++#++'+'    
    ;''             ````````````.``.`.....```                   `````````````````````   ````````````        ```````` ``````````  ,++''#:,`;    
     :#               ````````````.....`....``````````````````.`...`......``````````...,:::::,,..`         ```````` ```````````  ;'+++ ``      
      ''`               ``...`..````````................``....``````````````````````.,::::::::,:,`       ```````````````````````.++++'' ```    
      `'                    ````````````          ``````,. `````````````````````````.,,,:,,,,,...`     ```````````````````` `` `+++++++++;:`   
       +'`        `..`              ```````````````````.''.```.``````````````````````...........,`   ```.````..``````````` ``` `+#++++'#+'+    
       :+,`       `...`   `   `````````````````````````;';.```````````````````````````..,,,,,,,,.`` ``.`````.``````` ````` `  `'#+'+#++'''+    
        ++        `.,...   ```````````````````````````,''..`````````````````````````````.....```` ``...```..````````,,`  `` ` `+++++#''+'+'`   
       `,'#`      `,,,..`   ````````````````````````` ;',..````````````` `````````   ```````     ``...```.`````````.,,` ``` ``++'+++++''+''    
        `''+ `     ``....  `` ```````````````````````.;;.``````````````````      ``  `````     ````.````.``````` `,,,,` `` ```++''+##''''#     
       `';'+'``      `.,,`      `````````````````````:'..``             `````````````` ``     ```.````.``````.,,,,,,,``` ``` ##+#+#+''+;+`     
       ..,;+'```      `.,`     ``````````````````````;'.`                ```  ```           ```.````.``.`````,:,,,,.````  ``,##+####+++'`      
       `.;`:#+````     ``.`        ````` ````````````;'``                                 ````````.```````````:,,``````  ``,+##+####'+;;       
        .,,..+':```               `          ````` ``;;`        `                      `````````.`.```````````,,.````` ```:##+#++++#;:'        
        ..,,.:+''````                  `       `    `:.`       `                    ```````````...`````````  ````````  ``,'#++'+#+;':          
        ..,...:'''.````                              ..`                         ```````````...`````````   `````     ```,+##+##'#+':.          
        .,.,,,..;+'+..```                            ``                ``  ``````````.````...`````      ````````   `.``'+#++#+++#;,,.          
        `.,,.,..+##'#+: `..`````                                    `````..`````````````...````      ```````     ,.`::#+++++'''':....          
         #.,...,+##+++++. ```.......````````        ```````````.``.`.`````````````````...``      ````````    ``.`,+,+##+#'';';:..;;,`          
         ,.,.,.:'+#'+++#+',````````.........,.`......`..``......```````````````````....``      ````````````````:+.+#'+##'+'#';..#:;:`          
         ,,.'#,,,''+#++###++;,```````````````..:;:,`..,,:''#;:.`....``..`````````...````  ```````````````...:+++#+##+#++';:,,:.,','``          
         .,,:`',,,,,+::,'';+;:+;+','..',`,,;''';';++###'###@#++':###'':;:,,,.......`````````````````.,;#+#+#++++#'++++;;..,..,...,..           
         ,.:;.,.,,..;......#...;'+;###########@#'######++###+++++#@'@#+++::,,.,.....````````````,;;#++##+'++'++'+;++;;:,.,...,..,,.`           
         `';;..:...........+,,.,,'+++#+''##+#####++#@##++#######+##+#++'#'';:.........,.,..;+;,###+#+''+;'''+;':'';,............;,,`           
         `..,',,,.........,#,.,,,:@##+++##+++++##++###+'#++#++#@@###+##'#+#+#+++#''';;++'+##+'####+'++'##'+++';';,.....`.......,::.            
         `..,.,.,,.,.,,,.,,+,,,,,;;#######+''###++##+@'+'+''++++#######@#+#+''+#+#++++#++:#++#+##+++##;+'+'+;##+.,...............,`            
          ,..,,..,..,.,..,,,,,,,,;,'#########'+++'##+#++#+####';+++###+#+##++'#+#####+####+###'+;'+#+#';,,,,+;;',,................             
          ,..,,.,,.,.,,...,,,,,,,::;;'+++';,..,.#.::;''++++#####++##++###+#'+#######'##+#'++#''#'++''.....,,#;,.,,................             
          ,,..,.....,,,'.,,,,,,,::,:::.,.',`,...+.,,,:,''+;##+++#+#++++###+#'+##+++'''+'''+''';,,..........,':,,.+,'``...........`             
          .,,,..,......#.,,;+;:,:::,.....:......+.,..:::;:+###+###++';:;::;+'+;:::;;'#+###+,,,,,,........,,,:,.,#...`............              
          `.,,,..,....+:,,,#,,,,,:,,.................,:,;,,:#####+',,':,,,..,;..,,,,#.,'#++,,,,,.........,,,,..,;..:............`              
           ,.,,..,,.,;#',,,#,,,.,:,,,................:::;,,,,+##',..;;,,,,..,,,.,,,,@.,,:,',,,,,........,,,,,...:..+`..``.......               
           ...,,,.,..#.;,..'+@:.,:,,,................,::,,,,,:+.....',,,,,..,,,.,,,,'.,,,,,,,,,,.......,,,,,....+;'..`..........               
           ...,,..,.:+++;,.,,.@.,:,,,................,,,:,,,::+,,...,,,,,...,,,,,,,,,,,:,,,,,,,,........,,,,...,`.`..`.........`               
           `..,,..,....+,..'.,+,,,,:.................,::::::,,',...,,,,,,,..,.,,,,,,,,:,,,,.,,.........,,,,,.,,,..```..........`               
            ,..,..,.....,...:;.,.,,:.................:::,,:,,,:,....,,,,,,..,,,,,,,,,,::,,,,,,,,......,,,,..,,,...``...`.......                
            ...,..,...........,..,,,.................:,',,;,,,,.......,,,,..,,...,,,,,:,,,,#,,,........,,..,,.,.`..````.`.....`                
            ....,,..,........,,..,,,...............,.:#,;:#,,:........,,,,....,,,,,::::,.,:,,,,........,,,,,,.,...````.`......                 
            `......,........,,,..,,,................,,;.:+,+:,,......,.,,,..,..,,,,,,:,.,':,,.,.......,,,,,,,.,.`..`..........                 
            `......,..,,....,,,,.,,..................::#:+:+,,,......,.,,,.,...,,,::,,,.:,:::.,.......,,,,,,.,....``.```.....`                 
            `......,,..,.......,.,,.`................:,:'+,'...........,,,..,,,,,,,,,,...:,:,,,......,,,,,.,.,...``..........                  
             .......,............,,,.................::::;,',.,......,,,....,,,,,,,,,,..:',;,,,.....,,,.....,,......`........                  
             .........,,.........,,,................,:::::#;.........,,,.,.,,,,,,,,,,,.,.;',,,,......,,.....,....``..........                  
             `.....,...,.........,,,,`...............::::,,,,.,......,,,.,,,,,,,,:,,,,.+;.,,.,,......,....,.,...`............                  
              ...,.,.............,,,,................,::,,,,,,.......,,,.,.,,,.,,,,,,,.:..,,,,......,,......,..`.`..`........                  
              ....,.,............,,,,.`..............,::,,,,,,..`..,..,,.,.,,,,,,,,,,,....,,,,......,,,.....,...````.........                  
              ......,............,,,.,...............,:,,,,,,.........,,..,,,,.,,,,,,,...,,,,,......,,,.....,.`.`.`.........`                  
              `.....,..........,.,,,,................,:,,,,,,.......,..,,..,,.,,,,,,,,...,,,,,......,,,.....,....``.........                   
               .....,.,.........,,,,,.........,......,,,,,,,,.........,,,.,,,,.,,,,,,,...,,,.,......,,..,.....`.`.``........                   
               .......,...........,,,.........,......,,,,,,,,.,........,..,.,,,,,,,,,,...,,,,.......,,,.,.........`.`......`                   
               ....,..............,,,,.........,......,,,,,,,.,........,..,,,,,,,,,,,,.,.,,,,.........,...........`........                    
               `.....,,...........,,,.,...............,,,,,,,........,.,,.,,,.,,,,,,,,,..,,,.,.......,.....,.....`.........                    
               `.....,,,,.........,,,.,.,........,....,,,,,,.......,....,.,,,,,.,,,,,,.,,,,....`.....,,....,.`.....`.....,.                    
               `......,...........,,,.................,,,,,,.........,..,.,..,,,,,,,,,.,,,,,,..`.....,,....,.`.............                    
                ......,,,.,.......,,,...,.............,,,,,...........,.,.,,,.,,,,,,,..,.,,....`.....,,....,`..............                    
                ,......,,,,.......,,,,................,,,.,..........,,.,,.,,...,,,,,..,,,.,........,,,,...,``............`                    
                ,......,,,,.......,,,..,:.............,,..,,.,........,.,.,.....,,,,,..,,,,.................`.............                     
                .,......,,,.,.....,,.................,,,.,,,,.........,.....,.....,,,..,,,.,........,,......`............,                     
                .......,,,,........,.................,,,.,,,,........,....,......,,,,,.,,,.,,........,,.....``..........,.                     
                `.......,,,........,.................,,,,,,,,...............,,,..,,,,.,,,,..,.......,.......`...........,                      
                 .......,...,..,...,.................,,,,,,,,.........,`..........,,,,,,.,.........,.,.....``............                      
                 .......,,,..,.,...,...............`..,,,,,.............`..........,,.,,,,.,......,.,,,..................                      
                 .......,,...,.,,..,..................,,,,,.............`..........,,,,.,,........,,,.....,..............                      
                 `......,......,,..,................`.,,,,,............``..,....,.,,.,,.,..,......,,,..`..............,.`                      
                  ...............,.,.................,,,,,.......,.....``..,.,,..,,,,...,..,.....,,....`..........,,...,                       
                  `................,..................,,,,.,.......`...``.,,,.,,.,,,,...,..,.....,,,....`,..............                       
                   .......,........,..................,,,,.............`....,,,,.,,.....,..,.....,,,.....,.............                        
                   `..............,,,.................,.,..,...........`.....,,.,..,...,,.......,,,,.....,..........,..                        
                    .....,......,..,,,................,....,...........`..,,.,,,,,,....,........,..,....,,........,...                         
                     ....,......,.,,,.................,....,...............,,,.,,.,...,,,.......,,......,...........,`                         
                      `,`,,.......,,,,.....................,..............,,,,..,,...,,.,......,,,...,.,,..........,.                          
                        .,,......,,.,,.....................,.......`..`...,,,,.,,,..,,,...,.....,,,,.,..,..........`                           
                         ...,......,,,.,.........,........,,,.`...........,,:,,.,...,:..,,.......,,...,.,.........`                            
                         `.........,,,,..,...............,,,........,.....,,,,,.,..,:,....,...,.,,,...,.,.........                             
                          `.........,...,................,.,,.......,...`.,,,,.,,.,,,,,..,,.....,,.....,,........`                             
                            ...,,...,....................,,,,,,.,.........,,..,,,.,,,,..,,......,,,.....,.......                               
                             `...:..,....................,,,,.,...........,,..,,..,,,..,.,,.....,,.............                                
                               ...........................,,,.,.,..,......,.,,....,,,.,..,......,.,.....,....                                  
                                `.,......................,,,,,.....,.....,.,,,,...,.,.,,.,.....,,..........                                    
                                   `......................,,,,.,,.`.......,,,.,,,,,,,,,.......,.,,.,,....                                      
                                      ....................,,,,....`......,,,.,,,,,,.,.,.,,....,.,,,,,.,`                                       
                                       `.......,..........,,,,....`......,,,,,,,,,,,,,,,.,....,.,,,.,.                                         
                                         `...............,,,,......,.....,,,,:,,,,,,,,,.,,....,,,,,`                                           
                                            `..............,,......,.....,,,,,,,,,,.,,,,,,..,,..`                                              
                                               `..........,.,,,,,..,...`,,,,,,,,,..,.,,,,.                                                     
                                                      ``.......,,,......,,,.,,..,,..,..`                                                       
                                                              ```...`    `  `..,..`                                                            
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               

Filed under nodejs coffeescript generator

1 note

ZAPPA

Looks like I found the perfect little framework to play with on Turkey Day!

This looks awesome! If you get a chance read the github readme, it will blow your mind. Especially the part of writing both you client side and server side script in the same file, oh also websocket and http in the same file.

You have to love coffeescript and node! This is definitely the future!

Filed under coffeescript coffeekup zappa

3 notes

Express-Coffee - A Template for NodeJs, CoffeeScript, and Express

Express is a sinatra style framework for creating nodejs applications, coffeescript is a great way to write javascript. There is nothing special about this template other than it saves a lot of work if you want to create a nodejs app using express and coffee. I also included the mongodb driver, nodeunit, and socket-io.

If you want to check out nodejs, coffeescript, haml, and sass, you can use this template to get you started.

Check it out!

http://github.com/twilson63/express-coffee

Filed under coffeescript nodejs

5 notes

Weekend experience with #nodejs, @heroku, #coffeescript, and #express.

Since getting access to the nodejs private beta on heroku, I did the hello world app and it worked with no problems.

I wanted to something a little more complicated, not much, but something to help me get more familiar with nodejs and the deployment platform on heroku.

Ok, check out the code:

http://gist.github.com/403128

This little app, takes the first word of the url and uses it to query twitter search and gets a result set of json, then displays the results in the browser. (Nothing Fancy.)

Check it out the app

http://jackhq-node-hw.heroku.com/nodejs

This link will get last 20 tweets about nodejs

http://jackhq-node-hw.heroku.com/coffeescript

Bottom Line

Working with coffeescript is just simply an awesome experience, and deploying to heroku is awesome. I will work on more complicated examples when I have more time.

Awesome Job Heroku!

for creating an experience that is solid and user friendly for the nodejs platform.

Getting Started with NodeJs and Express

Check out

To see project NodeJs has to offer:

Filed under nodejs coffeescript express heroku