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
<?xml version="1.0" encoding="UTF-8"?> | |
<webconfig> | |
<mode>application</mode> | |
<basepath> | |
<static>static</static> | |
<template>template</template> | |
<session>memory</session> | |
</basepath> | |
<baseURI>/</baseURI> | |
<errorTemplate use="mako">myerror.html</errorTemplate> |
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
import sys, os | |
basePath = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) | |
sys.path.append(basePath) | |
# Add the experimental package of Yotsuba 3 | |
if not os.path.exists('/path/to/your/copy'): | |
raise Exception("Required Yotsuba 3 experimental package") | |
sys.path.append('/path/to/your/copy') |
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 | |
return array( | |
'routes' => array( | |
'blog-category' => array( | |
'type' => `Zend\Mvc\Router\Http\Literal`, | |
'options' => array( | |
'route' => '/category/index', | |
'defaults' => array( | |
'controller' => 'blog-category', | |
'action' => '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
[Tue Jan 17 13:04:36 2012] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'Zend\\Mvc\\Router\\Exception\\InvalidArgumentException' with message 'Missing "type" option' in /Users/jutin/Sites/z2/vendor/ZendFramework/library/Zend/Mvc/Router/SimpleRouteStack.php:235\nStack trace: | |
#0 /Users/jutin/Sites/z2/vendor/ZendFramework/library/Zend/Mvc/Router/Http/TreeRouteStack.php(112): Zend\\Mvc\\Router\\SimpleRouteStack->routeFromArray(Array) | |
#1 /Users/jutin/Sites/z2/vendor/ZendFramework/library/Zend/Mvc/Router/Http/TreeRouteStack.php(91): Zend\\Mvc\\Router\\Http\\TreeRouteStack->routeFromArray(Object(Zend\\Config\\Config)) | |
#2 /Users/jutin/Sites/z2/vendor/ZendFramework/library/Zend/Mvc/Router/SimpleRouteStack.php(152): Zend\\Mvc\\Router\\Http\\TreeRouteStack->addRoute('blog-category', Object(Zend\\Config\\Config)) | |
#3 /Users/jutin/Sites/z2/vendor/ZendFramework/library/Zend/Mvc/Bootstrap.php(114): Zend\\Mvc\\Router\\SimpleRouteStack->addRoutes(Object(Zend\\Config\\Config)) | |
#4 /Users/jutin/Sites/z2/vendor/ |
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 | |
return array( | |
'modules' => array( | |
'Application', | |
'Blog' | |
), | |
'module_listener_options' => array( | |
'config_cache_enabled' => false, | |
'cache_dir' => 'data/cache', | |
'module_paths' => array( |
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 SingletonInitializationException(Exception): | |
''' | |
This exception is used when the target class contain a special | |
attribute `_singleton_instance` not a reference to its own class. | |
''' | |
def singleton(class_reference, *args, **kwargs): | |
''' | |
Decorator to make a class to be a singleton class. |
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
''' | |
Find and provide command to remove a duplicate app icon on Launchpad for Mac OS X 10.7. | |
:Author: Juti Noppornpitak <[email protected]> | |
:Copyright: Juti Noppornpitak <[email protected]> | |
Prerequisites | |
------------- | |
pip install sqlalchemy | |
pip install https://github.com/shiroyuki/Tori/zipball/master |
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
export BASE_PATH="/var/www" | |
mkdir -p $BASE_PATH/bin | |
curl -o $BASE_PATH/.bash_profile https://gist.github.com/shiroyuki/2819364/raw/28eb2d6f6ee39845fa054cab56f8b998993a1138/.bashrc | |
# Customize VIM | |
curl -o $BASE_PATH/.vimrc https://gist.github.com/shiroyuki/2819393/raw/c9ae2db1b9959f6c60312aa716a2de107a7b3840/.vimrc |
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
# Homebrew code | |
export PATH=~/bin:$PATH | |
#export PYTHONPATH=~/Projects/Tori:~/Projects/Imagination:~/Projects/Kotoba:$PYTHONPATH | |
# Common | |
export SVN_EDITOR=vim | |
HISTCONTROL=ignoredups:ignorespace | |
shopt -s histappend | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 |
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
syntax on | |
set number | |
set autoindent | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=4 |
OlderNewer