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 MyProject < Padrino::Application | |
register Padrino::Rendering | |
register Padrino::Mailer | |
register Padrino::Helpers | |
MY_CONST = 123 | |
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
module Minesweeper | |
class Game | |
attr_reader :fields | |
def initialize | |
@fields = [] | |
@allow_input = true |
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
DynResourceLoader = Class.create({ | |
initialize: function () { | |
document.observe("custom:pageAddedToDOM", this.load.bind(this)); | |
}, | |
load: function (e) { | |
var page = e.memo; | |
if (page.hasAttribute("data-required-js")) { |
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
$pages-z-index: 1; | |
$menu-z-index: $pages-z-index - 1; | |
$betcard-mask-z-index: $pages-z-index + 1; | |
$betcard-z-index: $betcard-mask-z-index + 1; | |
$header-z-index: $betcard-z-index + 1; | |
$alert-dialog-z-index: $header-z-index + 1; | |
$betcard-delay-z-index: $alert-dialog-z-index + 1; | |
$ajax-blocker-z-index: $betcard-delay-z-index; |
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
(function(){ | |
$("firstName").value = "Joe"; | |
$("lastName").value = "Test"; | |
$("email").value = $("emailConfirm").value = "user" + Math.round(Math.random() * 1000000) + "@example.com"; | |
$("birthMonth").selectedIndex = 1; | |
$("birthDate").selectedIndex = 2; | |
$("birthYear").selectedIndex = 10; | |
$("phone").value = "123456789" | |
$("accName").value = "Tst" + Math.round(Math.random() * 1000000); | |
$("pwd").value = $("pwdConfirm").value = "Tester1234"; |
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
# Knights Tour - unpolished | |
module KnightsTour | |
class Game | |
def initialize (boardHeight, boardWidth) | |
@board = Array.new(boardHeight) {Array.new(boardWidth, 0)} | |
@moveCounter = 0; | |
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
xAjaxRequest = Class.create({ | |
initialize: function (url, options) { | |
//if the request has a callback, wrap that in our own callback | |
if (typeof options.onComplete == "function") { | |
var f = options.onComplete; | |
options.onComplete = |
NewerOlder