Skip to content

Instantly share code, notes, and snippets.

View jonathanselander's full-sized avatar
🦁
:)

Jonathan Selander jonathanselander

🦁
:)
View GitHub Profile
/**
* Simple sql format date
*
* @param string $format
* @return string
*/
function now($dayOnly=false)
{
return date($dayOnly ? 'Y-m-d' : 'Y-m-d H:i:s');
}
<?php
class Trollweb_Kreditor_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
die('yeah!');
}
}
<?php
$mainTable = new Zend_Db_Expr('(' . $collection->getSelect() . ')');
$collection->getSelect()
->reset()
->from($mainTable);
$this->setCollection($collection);
return parent::_prepareCollection();
Mage_Core_Model_Resource_Store_Collection: 1
Mage_Core_Model_Resource_Website_Collection: 1
Mage_Core_Model_Resource_Store_Group_Collection: 1
Mage_Catalog_Model_Resource_Product_Attribute_Collection: 0
Mage_Catalog_Model_Resource_Product_Option_Collection: 0
Mage_Catalog_Model_Resource_Product_Link_Product_Collection: 0
Mage_Reports_Model_Resource_Product_Index_Viewed_Collection: 0
Mage_Poll_Model_Resource_Poll_Answer_Collection: 0
<?xml version="1.0"?>
<!--
/**
* @package Made_Cache
* @author info@madepeople.se
* @copyright Copyright (c) 2012 Made People AB. (http://www.madepeople.se/)
*/
-->
<layout version="0.1.0">
<default>
package controllers;
import play.*;
import play.mvc.*;
import play.data.*;
import views.html.login.*;
import models.*;
public class Authentication extends Controller {
@jonathanselander
jonathanselander / gist:3097364
Created July 12, 2012 10:47
app/views/login/index.scala.html
@(loginForm: Form[User])
Test test
<?php
class Module
{
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
<block type="core/text" name="js_stuff">
<action method="setText">
<text><![CDATA[<script type="text/javascript" src="http://whatevs"></script>]]></text>
</action>
</block>
A java.lang.IllegalStateException exception has occurred.
Please report this at http://www.netbeans.org/community/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your /Users/js/Library/Application Support/NetBeans/7.2/var/log folder.
---------------------------------------------------------------------------
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.openide.util.actions.ActionInvoker$2
java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END
at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:951)