Skip to content

Instantly share code, notes, and snippets.

@BinaryKitten
BinaryKitten / hacman.php
Created February 9, 2014 18:50
hacman rpc
<?php
$header = <<<EOH
/*****************************************************************************
* Hacman Active Member RFIDs
* Requirements: PHP 5.3+, PHP XMLRPC and CURL Extensions
*
* Options Available:
* ---------------------
* -h, --help shows this message
* -u, --username the username for the RPC call
public function getServiceConfig()
{
return array(
'factories' => array(
'auth' => function(ServiceManager $sm) {
$db = $sm->get('Zend\Db\Adapter\Adapter');
$authAdapter = new \Zend\Authentication\Adapter\DbTable\CallbackCheckAdapter(
$db,
'users',
'username',
{
"name": "test/replace",
"minimum-stability": "dev",
"require": {
"zendframework/zendframework": "~2.2",
"doctrine/doctrine-orm-module": "0.8.*",
"slm/mail": "~1.3"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
for repo in $(cat repos-list.txt)
do
git clone user@host:/var/git/$repo
cd /d/repos/$repo
git remote add gitlab git@otherhost:group/$repo.git
git push gitlab master
for branch in $(git branch -r)
do
remote="${branch:0:6}"
<?php
$config = array(
'controllers' => array(
'manager' => array(),
'invokables' => array(),
'factories' => array(),
'plugins' => array()
),
'views' => array(
'manager' => array(),
<?php $this->form->prepare(); ?>
<div class="row">
<!-- Contenido seleccionado en el menu de la izquierda -->
<div class="col-md-9 col-md-push-3">
<div id="navigation_wrapper" style="display:none" class="navigation_content">
<?php echo $this->form()->openTag($this->form) . PHP_EOL; ?>
<?php foreach($this->form->getElements() as $formElement):?>
<div class="form-group">
<?php
namespace CustomTheme;
use Zend\Stdlib\ArrayUtils;
use Zend\ModuleManager\Feature\ServiceProviderInterface;
use Zend\ModuleManager\Feature\ViewHelperProviderInterface;
class Module implements ServiceProviderInterface,
ViewHelperProviderInterface
<?php
namespace Application;
use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
class Module
{
public function onBootstrap(MvcEvent $e)
<?php
class Pico_Cascadenav
{
public function get_pages(&$pages, &$current_page, &$prev_page, &$next_page)
{
$newPages = array('pages' => array());
foreach($pages as $page) {
[alias]
update = pull origin
st = status
submit = push origin
merge-branch = "!sh -c 'git checkout $1 && git update $1 && git checkout - && git merge $1' -"
merge-to = "!sh -c 'git checkout $1 && git update $1 && git merge - && git submit $1 && git checkout -' -"