Skip to content

Instantly share code, notes, and snippets.

View chukShirley's full-sized avatar

Chuk Shirley chukShirley

  • Sure Consulting LLC
  • Alabama
View GitHub Profile
<div class="ngCellText" ng-class="col.colIndex()" style="padding-top:5px; padding-left:5px;">
<span ng-cell-text>
{{console.log(row)}}
{{row.getProperty(col.id)}}
<button type="button" class="btn btn-sm btn-default" title="Edit peddler">
<span class="glyphicon glyphicon-edit"></span>
</button>
<button type="button" class="btn btn-sm btn-default" title="Pricing forumulas" ng-click="viewPricingFormulas()">
<span class="glyphicon glyphicon-usd"></span>
@chukShirley
chukShirley / InputXml.xml
Last active August 29, 2015 14:12
Toolkit calling RPG
<?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm name='RDSCF19' lib='CHIP'>
<parm comment=''>
<ds var='result' comment='Multi-occur container' array='on'>
<ds dim='100'>
<data var='adr' type='7s0'>0</data><data var='nam' type='30A' /><data var='drl' type='20A' /></ds>
</ds>
</parm>
</pgm>
# Created by Zend Server
<VirtualHost *:${port}>
# Make ZF2 path available as environment variable
SetEnv ZF2_PATH /usr/local/zendsvr6/share/ZendFramework2/library
# Tell apache to serve index.php if the requested resource doesn't exist.
# This allows static files to be served directly while "ZF-friendly URLS"
# are sent to index.php
INSERT INTO MYLIB/MYTABLE
(PEDDLER, ITEM, SCHEME, TYPE, PERCENTAGE, DEDUCTION, FIXED_AMOUNT, UNIT_OF_MEASURE, DESCRIPTION)
VALUES (:peddlerId, :itemId, :scheme, :type, :percentage, :deduction, :fixedAmount, :unitOfMeasure);
@chukShirley
chukShirley / ItemsGateway.php
Created January 20, 2015 13:37
Zend Data Cache
class ItemsGateway extends AbstractGateway
{
protected $table = 'SCF906';
public function fetchAll()
{
// Try to fetch from the cache first
$response = zend_shm_cache_fetch('itemCodes');
// If itemCodes list isn't in cache
@chukShirley
chukShirley / PLRFMLCRTC.CLLE
Last active December 17, 2015 20:29
Handling Integer Data Types
*************** Beginning of data *************************************
PGM PARM(&PED) //other params
DCL VAR(&PED) TYPE(*INT) LEN(4)
// other params
CALL PGM(SCRAPNEW/PLRFMLCRTR) PARM(&PED) //other params
ENDPGM
****************** End of data ****************************************
@chukShirley
chukShirley / CustomerCollection.php
Created February 9, 2015 14:02
Domain Design for Apigility on IBM i
<?php
// module/Acme/src/Acme/V1/Rest/Customer/CustomerCollection.php
namespace Acme\V1\Rest\PeddlerPricingFormula;
use Zend\Paginator\Paginator;
class CustomerCollection extends Paginator
{
}
@chukShirley
chukShirley / AbstractController.php
Last active August 29, 2015 14:18
Pagination and Filtering for OO PHP
<?php
namespace Sabel;
abstract class AbstractController
{
protected $diContainer;
public function __construct(DiContainer $diContainer){
$this->diContainer = $diContainer;
}
<?php
abstract class AbstractValue
{
protected $value;
private function __construct(){}
protected function filter()
{
@chukShirley
chukShirley / ToolkitService.php
Last active August 29, 2015 14:20
Proposed code for automatically generating toolkit service params from RPG D specs
<?php
$toolkit = new ToolkitService();
// Data to be passed to toolkit call
$data = array(
'testLabel' => 'testValue',
//...
);