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
fetch('/logout', { credentials: 'include' }) | |
.then(function(resp) { | |
return fetch('/login', { credentials: 'include' }) | |
}) | |
.then(function(resp) { | |
return resp.text() | |
}) | |
.then(function(body) { | |
$('body') | |
.html($('<div></div>').html($(body)).filter('.container')[0]) |
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 Foo | |
@bar = [] | |
class << self | |
attr_accessor :bar | |
end | |
end | |
# Ruby 1.9.2-p290 | |
Foo.bar #=> [] |
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
$('.hide-welcome').click(function() { | |
$('#welcome').fadeOut('fast', function() { | |
$('#getting-started').fadeIn('fast'); | |
}); | |
}); |
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
// Add an else statement in case the number is divisible by 5. | |
// for the numbers 1 through 20, | |
for (i=1; i<=20; i++) { | |
if ( i % 5 === 0 && i % 3 === 0) { | |
console.log("FizzBuzz"); | |
} else if ( i % 3 === 0 ) { | |
console.log("Fizz"); | |
} else if ( i % 5 === 0 ) { | |
console.log("Buzz"); |
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
Rails.application.routes.draw do | |
resource :home | |
root :to => 'home#index' | |
end | |
Rails.application.routes.draw do | |
web_start | |
web_start_required_for do | |
resource :home | |
root :to => 'home#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
module Interceptor | |
def self.included(base) | |
base.class_eval do | |
alias_method :establish_connection_before_interception, :establish_connection | |
def establish_connection | |
"intercepted" | |
end | |
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
local db = TukuiDB["tooltip"] | |
if not db.enable then return end | |
-- Texture tooltips | |
local tooltips = { | |
GameTooltip, | |
ItemRefTooltip, | |
ShoppingTooltip1, | |
ShoppingTooltip2, | |
ShoppingTooltip3, |
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
-- ACTION BAR PANEL | |
TukuiDB.buttonsize = TukuiDB:Scale(27) | |
TukuiDB.buttonspacing = TukuiDB:Scale(4) | |
TukuiDB.petbuttonsize = TukuiDB:Scale(29) | |
TukuiDB.petbuttonspacing = TukuiDB:Scale(4) | |
local barbg = CreateFrame("Frame", "TukuiActionBarBackground", UIParent) | |
TukuiDB:CreatePanel(barbg, 1, 1, "BOTTOM", UIParent, "BOTTOM", 0, TukuiDB:Scale(14)) | |
if TukuiDB.lowversion == true then | |
barbg:SetWidth((TukuiDB.buttonsize * 12) + (TukuiDB.buttonspacing * 13)) |
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
file 'Gemfile', <<-GEMS | |
source 'http://gemcutter.org' | |
gem "rails", "3.0.0.beta4" | |
gem "bson_ext" | |
gem "mongoid", "2.0.0.beta7" | |
gem "haml", "3.0.12" | |
gem "compass", "0.10.2" | |
gem "inherited_resources" | |
gem "devise", :git => 'git://github.com/plataformatec/devise.git' |