Skip to content

Instantly share code, notes, and snippets.

View sinamiandashti's full-sized avatar
🏋️‍♀️
Focusing

sina miandashti sinamiandashti

🏋️‍♀️
Focusing
View GitHub Profile
@sinamiandashti
sinamiandashti / module.php
Created May 18, 2012 17:31
problem bootstrap evend zf2
<?php
namespace Accounting;
use Zend\Module\Manager,
Zend\EventManager\Event,
Zend\EventManager\StaticEventManager,
Zend\Module\Consumer\AutoloaderProvider;
class Module implements AutoloaderProvider {
@sinamiandashti
sinamiandashti / Paginator.php
Created August 9, 2012 22:50
zf doctrine paginator adapter
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Paginator
*
@sinamiandashti
sinamiandashti / gist:3308783
Created August 9, 2012 22:52
example usage zf doctrine paginator
$movies = $this->_em->createQueryBuilder();
$movies->add("select", "m")
->add("from", "Movies m")
->add("where", "m.active = '1'");
$pagin = new Zend_Paginator(new Paginator($movies));
$pagin->setItemCountPerPage(10);
@sinamiandashti
sinamiandashti / index.php
Last active December 23, 2015 08:19
aaab.ir multilang
<?
if (array_key_exists('lang', $_GET)) {
$currentlang = $_GET['lang'];
} else {
$currentlang = 'en';
}
$langdataArray = array(
'texten' => 'textfa',
);
@sinamiandashti
sinamiandashti / Host.php
Last active January 2, 2016 13:59
TWB bundle inline layout in fieldset issue
$this->add(array(
'type' => 'Zend\Form\Element\Collection',
'name' => 'hostmacros',
'twb-layout' => \TwbBundle\Form\View\Helper\TwbBundleForm::LAYOUT_INLINE,
'options' => array(
// 'label' => 'Please choose categories for this product',
// 'count' => 2,
'twb-layout' => \TwbBundle\Form\View\Helper\TwbBundleForm::LAYOUT_INLINE,
'should_create_template' => true,
@sinamiandashti
sinamiandashti / html
Created January 15, 2014 06:26
output ... neilme bootstrap inline form field
<fieldset>
<fieldset class="form-inline"><div class="form-group "><input name="hostmacros[0][macro]" placeholder="{$MACRO}" class="form-control" type="text" value=""></div>
<div class="form-group "><input name="hostmacros[0][value]" placeholder="value" class="form-control" type="text" value=""></div>
</fieldset><span data-template="&lt;fieldset class=&quot;form-inline&quot;&gt;&lt;div class=&quot;form-group &quot;&gt;&lt;input name=&quot;hostmacros[__index__][macro]&quot; placeholder=&quot;{$MACRO}&quot; class=&quot;form-control&quot; type=&quot;text&quot; value=&quot;&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;form-group &quot;&gt;&lt;input name=&quot;hostmacros[__index__][value]&quot; placeholder=&quot;value&quot; class=&quot;form-control&quot; type=&quot;text&quot; value=&quot;&quot;&gt;&lt;/div&gt;
&lt;/fieldset&gt;"></span></fieldset>
@sinamiandashti
sinamiandashti / gist:8487560
Created January 18, 2014 07:49
double field-sets output in bootstrap zf2 module
<fieldset class="form-control"><fieldset class="form-inline"><div class="form-group "><input name="hostmacros[0][macro]" placeholder="{$MACRO}" class="form-control" type="text" value=""></div>
<div class="form-group "><input name="hostmacros[0][value]" placeholder="value" class="form-control" type="text" value=""></div>
</fieldset><span data-template="&lt;fieldset class=&quot;form-inline&quot;&gt;&lt;div class=&quot;form-group &quot;&gt;&lt;input name=&quot;hostmacros[__index__][macro]&quot; placeholder=&quot;{$MACRO}&quot; class=&quot;form-control&quot; type=&quot;text&quot; value=&quot;&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;form-group &quot;&gt;&lt;input name=&quot;hostmacros[__index__][value]&quot; placeholder=&quot;value&quot; class=&quot;form-control&quot; type=&quot;text&quot; value=&quot;&quot;&gt;&lt;/div&gt;
&lt;/fieldset&gt;"></span></fieldset>
Pruning file `/usr/local/opt/boost/include/boost/range/iterator_range.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/iterator_range_core.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/iterator_range_io.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/mutable_iterator.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/rbegin.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/rend.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/result_iterator.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/reverse_iterator.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/size.hpp'.
Pruning file `/usr/local/opt/boost/include/boost/range/size_type.hpp'.
@sinamiandashti
sinamiandashti / gist:8b0eae186148e977c233
Last active August 29, 2015 14:05
make -j1 hhvm osx
[ 26%] Built target hphp_analysis
[ 26%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/analyze.cpp.o
[ 26%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/cfg.cpp.o
[ 26%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/check.cpp.o
[ 26%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/class-util.cpp.o
[ 26%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/dce.cpp.o
[ 27%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/debug.cpp.o
[ 27%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/emit.cpp.o
[ 27%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/func-util.cpp.o
[ 27%] Building CXX object hphp/hhbbc/CMakeFiles/hphp_hhbbc.dir/hhbbc.cpp.o
@sinamiandashti
sinamiandashti / gist:22dfc847570ede4e9f02
Created September 10, 2014 08:32
osx make 100% failed
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Bits.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Checksum.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Conv.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Demangle.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/dynamic.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/File.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/FileUtil.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Format.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/GroupVarint.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/IPAddress.cpp.o