Skip to content

Instantly share code, notes, and snippets.

View meltingice's full-sized avatar

Ryan LeFevre meltingice

View GitHub Profile
class SomeApp
def some_function(a)
puts a
Views::Index.instance_eval do
attr_reader :a
set_instance_variable(:@a, a)
end
end
class SomeApp
def some_function(a)
puts a
end
module Views
class Index < Mustache
<!-- 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. -->
var artifact;
$.ajax({
type: "GET",
url: file,
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)