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
| file_cache_path "/tmp/chef-solo" | |
| cookbook_path "/tmp/chef-solo/cookbooks" |
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
| { | |
| "chef_server": { | |
| "server_url": "http://localhost:4000", | |
| "webui_enabled": true | |
| }, | |
| "yum": { "epel_release": "6-7" }, | |
| "run_list": [ "recipe[chef-server::rubygems-install]" ] | |
| } |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title>My Web Page</title> | |
| <meta charset="utf-8"> | |
| <link href="/stylesheets/main.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
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
| args = | |
| markdown: (path)-> require("markdown-js").parse fs.readFileSync(path).toString() | |
| app.get "/", (req, res)-> res.render 'index', args | |
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
| args = | |
| markdown: (path)-> require("markdown-js").parse fs.readFileSync(path).toString() | |
| app.get "/", (req, res)-> res.render 'index', args | |
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
| require "kramdown" | |
| require "haml" | |
| task :default => :doc | |
| task :doc do | |
| bootstrap = "https://raw.github.com/cdnjs/cdnjs/master/ajax/libs/twitter-bootstrap/2.1.1/css/bootstrap.min.css" | |
| responsive = "https://github.com/cdnjs/cdnjs/blob/master/ajax/libs/twitter-bootstrap/2.1.1/css/bootstrap-responsive.min.css" | |
| jquery = "http://code.jquery.com/jquery-1.8.2.min.js" | |
| coffeescript = "http://coffeescript.org/extras/coffee-script.js" |
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
| ### | |
| Example: retrieving all links of yahoo.com | |
| $ npm up | |
| $ node_modules/.bin/coffee example.coffee | |
| ### | |
| require "./node-jquery" | |
| $.ajax | |
| url: 'http://www.yahoo.com' | |
| success: (res)-> | |
| for e in $(res).find("a") |
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
| mkdeferred = (wrapped, func)-> | |
| -> | |
| dfd = $.Deferred() | |
| args = _.flatten [wrapped, dfd, [].slice.apply arguments] | |
| func.apply null, args | |
| dfd.promise() |
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
| #!/usr/bin/env bash | |
| \curl -L https://get.rvm.io | bash -s stable | |
| source ~/.rvm/scripts/rvm | |
| for e in readline iconv curl openssl zlib autoconf ncurses pkgconfig gettext glib mono llvm libxml2 libxslt libyaml; do rvm pkg install $e; done | |
| rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr | |
| gem install --no-ri --no-rdoc chef |
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
| import System.IO | |
| main = do | |
| handle <- openFile "haiku.txt" ReadMode | |
| contents <- hGetContents handle | |
| putStr contents | |
| hClose handle |