This file contains 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
requirejs.config({ | |
paths: { | |
jquery: 'libs/jquery', | |
plates: 'libs/plates', | |
director: 'libs/director', | |
bootstrap: 'libs/bootstrap', | |
store: 'libs/store', | |
underscore: 'libs/underscore' | |
}, | |
shim: { |
This file contains 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
define(['presenter', 'director'], function(Presenter, Director) { | |
var routes = { | |
'/issues': { | |
on: Presenter.Issue.list, | |
'/:id': { | |
on: Presenter.Issue.show | |
} | |
} | |
}; | |
This file contains 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
define(['jquery', 'store'], function($, Store){ | |
var Issue = { | |
all: function(callback) { | |
$.getJSON('issues.json', function(issues) { | |
callback(issues); | |
}); | |
}, | |
get: function(id, callback) { | |
$.getJSON('issues/' + id + '.json', function(issue) { | |
callback(issue); |
This file contains 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
define(['jquery', 'bootstrap', 'plates', 'resource', 'underscore'], function($, Bootstrap, plates, Resource, _) { | |
var Issue = { | |
list: function(callback) { | |
Resource.Issue.all(function(issues) { | |
var template = $('#issue').html(); | |
var bound = Plates.bind(template, issues); | |
$('.table').append(bound); | |
$('.issue').show(); | |
console.log(bound); | |
}); |
This file contains 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
package calculator; | |
import java.util.Scanner; | |
/** | |
* Calculator | |
* A class that offers simple calculator functionality. | |
* | |
* @author Matthew Sullivan | |
*/ |
This file contains 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
(:use wiggle.core) | |
(! 'html {} ; takes three params - 'tag {:option "value"} & content | |
(! 'head {} ; you can use anything for the tag, it just plugs in what you type | |
(! 'title {} "Example")) ; make sure to include {} even if you have no options | |
(! 'body {} "This is a test!" ; you can nest until your hearts content! | |
(! 'div {:class "style"} "Hello, world!" | |
(! 'div {} "another bird's nest")))) |
This file contains 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> | |
<title>Example</title> | |
</head> | |
<body> | |
This is a test! | |
<div class="style"> | |
Hello, world! | |
<div> | |
another bird's nest |
This file contains 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
(:use wiggle.core) | |
(! 'html {} | |
(! 'head {} | |
(! 'title {} "Example")) | |
(! 'body {} "This is a test!" | |
(! 'div {:class "style"} "Hello, world!" | |
(! 'div {} "another bird's nest")))) |
This file contains 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
$.fileDownload('/url/to/download.pdf', { | |
successCallback: function (url) { | |
alert('You just got a file download dialog or ribbon for this URL :' + url); | |
}, | |
failCallback: function (html, url) { | |
alert('Your file download just failed for this URL:' + url + '\r\n' + | |
'Here was the resulting error HTML: \r\n' + html | |
); |
This file contains 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
#cloud-config | |
--- | |
write_files: | |
- path: /opt/bin/waiter.sh | |
owner: root | |
content: | | |
#! /usr/bin/bash | |
until curl http://127.0.0.1:2379/v2/machines; do sleep 2; done | |
coreos: |
OlderNewer