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
class SomeApp | |
def some_function(a) | |
puts a | |
Views::Index.instance_eval do | |
attr_reader :a | |
set_instance_variable(:@a, a) | |
end | |
end | |
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
class SomeApp | |
def some_function(a) | |
puts a | |
end | |
module Views | |
class Index < Mustache | |
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
<!-- Place in your the <head> of your page --> | |
<script src='https://githubanywhere.appspot.com/github-anywhere.js'></script> | |
<script> | |
GitHubAnywhere(function() { | |
// use `this` instead of passing the object? | |
this.buttons(); | |
}); | |
</script> | |
<!-- Place anywhere on your page replaceing :name with a GitHub username and :repo with a repository name. --> |
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
var artifact; | |
$.ajax({ | |
type: "GET", | |
url: file, |
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
var that = this; | |
Overlay = { | |
init: function(elementToOverlay, content, options) { | |
that.options = $.extend({ | |
element: 'div', | |
attributes: {} | |
}, options); | |
that.overlay = $(html[that.options.element](that.options.attributes, content)) | |
.click(that.hideOverlay) |