git init
or
Model:: | |
/*Select*/ | |
select('col1','col2') | |
->select(array('col1','col2')) | |
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
->addSelect('col3','col4') | |
->distinct() // distinct select | |
/*From*/ |
namespace MyApp\ApiBundle\Serializer; | |
use JMS\Serializer\Context; | |
use JMS\Serializer\GraphNavigator; | |
use JMS\Serializer\Handler\SubscribingHandlerInterface; | |
use JMS\Serializer\VisitorInterface; | |
use JMS\Serializer\XmlSerializationVisitor; | |
class DoctrineProxyHandler implements SubscribingHandlerInterface | |
{ |
<?php | |
class EloquenFooRepository | |
{ | |
/** | |
* The base eloquent model | |
* @var Eloquent | |
*/ | |
protected $model; |
Creating a service to startup at BeagleBone Black boot time:
Create a shell script such as /usr/bin/myFancyBash.sh:
#!/bin/bash
# this could be any runnable code or shell script, really
/usr/bin/myFancyPython.py
Note that the first line is critical.
{ | |
".123" : "application/vnd.lotus-1-2-3", | |
".3dml" : "text/vnd.in3d.3dml", | |
".3g2" : "video/3gpp2", | |
".3gp" : "video/3gpp", | |
".a" : "application/octet-stream", | |
".aab" : "application/x-authorware-bin", | |
".aac" : "audio/x-aac", | |
".aam" : "application/x-authorware-map", | |
".aas" : "application/x-authorware-seg", |
This gist assumes:
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gearmand | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gearmand job queue | |
# Description: starts gearmand using start-stop-daemon |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |