Skip to content

Instantly share code, notes, and snippets.

View cgsmith's full-sized avatar
👋
Available to work on your projects!

Chris Smith cgsmith

👋
Available to work on your projects!
View GitHub Profile
<?php
// English -> Japanese examples from Google Translate
return array(
'SD Card Program List' => 'SDカードのプログラムリスト',
'Name' => '名前',
'Created' => '作成',
'Modified' => '変更されました',
'No programs listed yet' => 'なしのプログラムがまだ表示されません',
'Create program' => 'プログラムを作成します',

Keybase proof

I hereby claim:

  • I am cgsmith on github.
  • I am cgsmith (https://keybase.io/cgsmith) on keybase.
  • I have a public key whose fingerprint is 7D7E 74F4 C61E 4BCA B9DD A57B A336 E263 DABE 9A0D

To claim this, I am signing this object:

<?php
if ( count($apsBatchResults) > 0 ) {
foreach ( $apsBatchResults AS $orderID=>$resultsSet ) {
extract($resultsSet);
$imageFilePathInfo = pathinfo($imagePath);
$manifestFilePathInfo = pathinfo($manifestPath);
$encryptedImagePath = "$imagePath.gpg";
$encryptedManifestPath = "$manifestPath.gpg";
<?php
class TransferHandler
{
/**
* @var string ftp host
*/
protected $targetFTPHost = "sftp.customer.com";
/**
* @var string ftp user
<h1>Cart</h1>
<?php
require 'lib/myLibrary.php';
?>
<p>Your cart consists of <?=$_GET['item']. ' for $' . $inventory[$_GET['item']]/100;?></p>
<?php
namespace Cgsmith\Validate;
/**
* Class ValidateRecaptcha
* Handle validation against Google API
*
* @package Cgsmith
* @license MIT
* @author Chris Smith
<?php
namespace Cgsmith\Form\Element;
/**
* Class Recaptcha
* Renders a div for google recaptcha to allow for use of the Google Recaptcha API
*
* @package Cgsmith
* @license MIT
* @author Chris Smith
<?php
/**
* After making necessary ZF 1.12.8 changes
*/
$nameColumn = new Zend_Db_Expr("trim(concat_ws(' ', user.nameprefix, user.firstname, user.lastname)) as name");
$select = $this->getDbTable()->select();
$select->from(
$this->_getDbTable()->info(Zend_Db_Table_Abstract::NAME),
array(
$nameColumn,
<?php
/**
* Pre Zend 1.12.8
*/
$select = $this->getDbTable()->select();
$select->from(
$this->_getDbTable()->info(Zend_Db_Table_Abstract::NAME),
array(
"trim(concat_ws(' ', user.nameprefix, user.firstname, user.lastname)) as name",
"user.email",
@cgsmith
cgsmith / Vagrantfile
Created March 4, 2015 01:57
Vagrant example with Ansible. This is a simple setup I use for Vagrant and Ansible for the majority of my projects. Note that my provisioning stuff is in a folder.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
# Variables
data = YAML.load_file("provisioning/variables.yml")
Vagrant.require_version ">= 1.6.0"
Vagrant.configure("2") do |config|