Skip to content

Instantly share code, notes, and snippets.

View machal's full-sized avatar

Martin Michálek machal

View GitHub Profile
@machal
machal / gist:4568
Created August 8, 2008 13:39 — forked from karmi/gist:4567
def test_proper_localization_for_czech
falsify_today
hostname 'www.application.cz'
get :index
assert_tag :tag => 'h1', :content => 'Program Květen/Červen 2008'
assert_select '#topMenu a', :text => 'English'
assert_select '#headMenu strong', :text => 'Program'
assert_select '#program_item_2008-05-30 .day a', :text => 'pátek 30/05'
end
<%- @event.entrance_fees.reverse.each do |fee| -%>
<li><%= t('number.currency.format.unit') %> <%= "<span title=\"#{fee.description}\">#{fee.price}</span>" %> <%= " <em>(#{fee.description})</em>" if fee.description && !fee.description.empty? %> </li>
<%- end -%>
<%= link_to_remote("Kalendář",
{:url => calendar_path, :method => 'get', :loading => 'Aplication.Calendar.loading()', :complete => 'Aplication.Calendar.loaded()'},
{:href => calendar_path, :class => 'calendar-link'})
%>
<link rel="stylesheet" href="/stylesheets/index.css" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="/stylesheets/sifr.css" media="all" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="/stylesheets/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<link rel="stylesheet" href="/stylesheets/print.css" type="text/css" media="print" />
<script src="/javascripts/sifr.js" type="text/javascript"></script>
<script src="/javascripts/sifr-config.js" type="text/javascript"></script>
<link rel="stylesheet" href="/stylesheets/index.css" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="/stylesheets/sifr.css" media="all" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="/stylesheets/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<link rel="stylesheet" href="/stylesheets/print.css" type="text/css" media="print" />
<script src="/javascripts/sifr.js" type="text/javascript"></script>
<script src="/javascripts/sifr-config.js" type="text/javascript"></script>
<?php
/*
Skript, ktery podle vyhledavani v databazi vypise seznam obci pro naseptavac
*/
// Pridame stare kodovani, protoze default je utf8
header("Content-Type: text/html; charset=windows-1250");
// Nacteme funkce pro pripojeni k databazi atd.
@machal
machal / query.php
Created May 28, 2009 14:11
Skript, ktery podle vyhledavani v databazi vypise seznam obci pro naseptavac
<?php
// Nacteme hledany retezec do promenne
$q = strtolower( $_GET["q"] );
if (!$q) return;
// Pripojime se k databazi
mysql_connect( $db_host, $db_user, $db_pass ) or die( mysql_error() );
mysql_select_db( $db_name ) or die( mysql_error() );
We couldn’t find that file to show.
print.css:
#logo img
{
display: none;
}
#logo:after {
content: url('/images/logo.print.png');
}
# Delete/Move Rails default files
log 'moving', 'Rails default files'
run "mv README doc/README_FOR_RAILS"
run "rm public/index.html"
# Copy database.yml
log "copying", "database.yml"
run "cp config/database.yml config/database.example.yml"
# Set up .gitignore files