Skip to content

Instantly share code, notes, and snippets.

@dardub
dardub / gist:1665293
Created January 23, 2012 20:08
lemonstand side cart
<? $items = Shop_Cart::list_active_items();
$total = Shop_Cart::total_price();
$total_qty = Shop_cart::get_item_total_num();
?>
<div class="box base-mini mini-cart">
<div class="head">
<h4> &nbsp; My Cart</h4>
</div>
<div class="actions">
function style_forms() {
var ua = $.browser;
if (!(ua.msie && ua.version.slice(0,1) == "7"))
{
$('input:checkbox, input:radio').livequery(function(){
$(this).uniform();
});
}
}
@dardub
dardub / gist:2638754
Created May 8, 2012 19:42
nested breadcrumbs
<!-- start breadcrumbs -->
<? if ( isset($category) && $category instanceof Shop_Category ):
$parent_categories = $category->get_parents(true);
?>
<ol class="breadcrumbs">
<? foreach ($parent_categories as $parent_category): ?>
<li class="<?= $parent_category->id == $category->id ? 'last' : null ?>">
<? if ($parent_category->id != $category->id): ?><a href="<?= $parent_category->page_url('/category') ?>"><? endif ?>
<?= h($parent_category->name) ?>
<? if ($parent_category->id != $category->id): ?></a><? endif ?>
$manufacturers = Shop_Manufacturer::create();
$manufacturers->where('exists (select * from shop_manufacturers, shop_products
where shop_products.manufacturer_id = shop_manufacturers.id
and shop_products.id = 3984)');
/* returns MySQL error executing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from shop_manufacturers, shop_products
where shop_prod' at line 6
*/
Support files install directory [/usr/local/phpfog]: Path to install PF executable [/usr/local/bin]: PHP Warning: fopen(php://stdin): failed to open stream: operation failed in - on line 87
PHP Warning: fgets() expects parameter 1 to be resource, boolean given in - on line 87
All settings correct for using PF.
Cloning pf repo to /usr/local/phpfog/pf
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
PHP Warning: symlink(): No such file or directory in - on line 182
Installation is complete however the following issue(s) may prevent pf from working:
Could not find pf in $PATH. Please add the following to your $PATH: /usr/local/bin
<VirtualHost *:80>
DocumentRoot "/home/desktop/data/code/public"
ServerName dev.lebuy.co.id
<Directory /home/desktop/data/code/public>
Options +Indexes +FollowSymlinks
Order allow,deny
Allow from all
AllowOverride all
</Directory>
</VirtualHost>

Biraj: Darren, I will be setting up your services on your account now. I will personally make sure that the account is set up correctly the way you want it to be. While waiting, may I ask you a few questions to make sure that we get you in the right package that suits your needs?

DARREN: I think I'm fine with the package I selected

Biraj: I understand your concern. However we have some great offer for our existing customer.

DARREN: ok let's see what you got then, but I'm not interested in any phone services

Biraj: Okay.

[
{ "keys": ["ctrl+,"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["ctrl+."], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["ctrl+shift+,"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+."], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["ctrl+'"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} },
{
"font_face": "Monaco",
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
]
}
.animate {
-webkit-animation-duration: 0.5s;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: both;
-moz-animation-duration: 0.5s;
-moz-animation-timing-function: ease;
-moz-animation-fill-mode: both;
-ms-animation-duration: 0.5s;
-ms-animation-timing-function: ease;
-ms-animation-fill-mode: both;