This file contains hidden or 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
// Copyright 2011 Vaclav Bohac <[email protected]>. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS-IS" BASIS, |
This file contains hidden or 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 | |
require __DIR__ . '/libs/Nette/loader.php'; | |
Nette\Diagnostics\Debugger::enable(); | |
$configurator = new Nette\Configurator(); | |
$context = $configurator->getContainer(); | |
$payload = array('foo' => 'bar'); |
This file contains hidden or 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 | |
/** | |
* Latte macros. | |
* | |
* @copyright Copyright (c) 2011 Vaclav Bohac | |
* @package Macros | |
*/ | |
use Nette\Latte; |
This file contains hidden or 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
/** | |
* Formfix enables you to use AJAX forms with Nette FW | |
* and helps keep tracking of history in jQuery mobile. | |
* | |
* Requires jQuery 1.4+, jQuery mobile 1.0 | |
* | |
* Usage: | |
* $("#foo").formfix(); | |
* | |
* @author Vaclav Bohac <[email protected]> |
This file contains hidden or 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> | |
<meta charset="utf8"> | |
<meta name="description" content="Example mobile login page"> | |
<meta name="robots" content="{$robots}" n:ifset="$robots"> | |
<title>{include #title}</title> | |
<link rel="stylesheet" media="screen" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" type="text/css"> |
This file contains hidden or 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
{define detail} | |
<div data-role="page" id="{$name|webalize}"> | |
<div data-role="header"> | |
<h1>Detail vozidla {$name}</h1> | |
</div> | |
<div data-role="content"> | |
<div data-role="collapsible"> | |
<h3>Popis vozidla</h3> |
This file contains hidden or 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
using System; | |
using System.Text.RegularExpressions; | |
class RegexExamples | |
{ | |
public static void Main() | |
{ | |
// Simple match. | |
string[] foo = {"vim", "mvim", "gvim", "emacs"}; |
This file contains hidden or 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
using System; | |
using System.Text; | |
// Example of C# string interning. | |
// Created by Vaclav Bohac in 2011 | |
class Test | |
{ | |
public static void Main() |
This file contains hidden or 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 | |
class HomepagePresenter extends BasePresenter | |
{ | |
public function actionDefault() | |
{ | |
$detector = $this->context->detector; | |
if ($detector->isMobile()) { | |
$this->redirect("mobile"); |
This file contains hidden or 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
" Set up color theme. " | |
(add-to-list 'load-path ".emacs.d") | |
(require 'color-theme) | |
(require 'color-theme-gruber-darker) | |
(eval-after-load "color-theme" | |
'(progn | |
(color-theme-initialize) |