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
~/tmp/git-example (master) $ git log | |
fc8f07f 2014-06-25 15:25:14 +0200 | A (HEAD, master) [Jan Dudek] | |
530ef46 2014-06-25 15:08:41 +0200 | initial commit [Jan Dudek] | |
~/tmp/git-example (master) $ git log b | |
86c2a22 2014-06-25 15:25:49 +0200 | B (b) [Jan Dudek] | |
530ef46 2014-06-25 15:08:41 +0200 | initial commit [Jan Dudek] | |
~/tmp/git-example (master) $ git log c | |
773f7a1 2014-06-25 15:26:13 +0200 | C (c) [Jan Dudek] |
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
<?php | |
/* | |
* $Id$ | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
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
require 'spec_helper' | |
module ActiveModel | |
class Errors | |
def error_names | |
@_error_names ||= { } | |
end | |
def add_with_save_names(attribute, message = nil, options = {}) | |
message ||= :invalid |
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 SessionsController < ApplicationController | |
def create | |
session[:created] = true | |
render :text => "Session created" | |
end | |
def check | |
if session[:created] | |
render :text => "Session exists" | |
else |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="jquery.js" type="text/javascript"></script> | |
<script src="deferred.js" type="text/javascript"></script> | |
</head> | |
<body></body> | |
</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
csv = File.open("index.csv", "w") | |
Dir.glob("in/*").each_with_index do |path, i| | |
file = path.gsub("in/", "").gsub(/\.wav$/, "") | |
index = i + 1 | |
difficulty = case file | |
when /^latwe/ | |
1 | |
when /^srednie/ |
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
require File.dirname(__FILE__) + "/../test_helper" | |
class GameApiTest < Bbq::TestCase | |
background do | |
@admin = TestUser.new | |
@admin.roles(:admin) | |
@admin.prepare_game_data | |
@client = TestClient.new | |
@client.extend(TestClient::GameClient) |
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
# A few thoughts on testing rich-client applications | |
# Jan Dudek, Arkency | |
# We've created a game that has some animations, uses Facebook API. Almost no rendering on the server. Client-server communication through JSON REST API. | |
OlderNewer