Skip to content

Instantly share code, notes, and snippets.

# /dev/ci/setup_ssh.sh
#!/usr/bin/env bash
which ssh-agent || (apt-get update -y && apt-get install openssh-client -y)
eval $(ssh-agent -s)
ssh-add <(echo "$PLATFORMSH_DEPLOY_KEY")
mkdir -p ~/.ssh
[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
@lsmith77
lsmith77 / gist:6f352592b0a460fb0886f4cec82d51de
Created February 2, 2017 14:18
propel join with additional condition on a date
// also tried using addJoinObject + addJoinCondition but either way the condition just gets ignored
$results = $this->getFooQuery()
->addJoin(
FooTableMap::COL_ID,
BarTableMap::COL_ITEM_ID,
Criteria::LEFT_JOIN
)
->addCond(BarTableMap::COL_UPDATED_AT, $updatedAt->format('Y-m-d H:i:s'), Criteria::LESS_THAN)
->toString()
;
<?php
$security_provider = getenv('SECURITY_PROVIDER');
if (empty($security_provider)) {
if ('dev' === getenv('APP_ENVIRONMENT')) {
$security_provider = 'chain_provider';
} else {
$security_provider = 'ldap';
}
}
Verifying that +lsmith is my blockchain ID. https://onename.com/lsmith
@lsmith77
lsmith77 / gist:f1ab3fe12fb0813ba4f7
Created June 10, 2015 13:07
this compiler pass fails with "Unable to dump a service container if a parameter is an object or a resource."
<?php
namespace Liip\TranslationBundle\DependencyInjection\Compiler;
use Doctrine\ODM\PHPCR\Mapping\Annotations\Reference;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Compiler pass to dynamically set the service for isGrant checks (can be removed when requiring Symfony 2.6+
@lsmith77
lsmith77 / Logitech R700 with reveal.js
Created November 2, 2014 15:41
Logitech R700 with reveal.js
<?xml version="1.0"?>
<!-- Use with KeyRemap4MacBook:
http://pqrs.org/macosx/keyremap4macbook/ -->
<root>
<devicevendordef>
<vendorname>LOGITECH</vendorname>
<vendorid>0x046d</vendorid>
</devicevendordef>
<deviceproductdef>
@lsmith77
lsmith77 / gist:93a9c4431ad1bbe9f06a
Created June 30, 2014 09:03
Compiling Oak from source and installing MongoDB via homebrew
brew update
brew outdated
brew upgrade
brew install maven
brew install mongodb
mongod --config /usr/local/etc/mongod.conf
wget http://www.eu.apache.org/dist/jackrabbit/oak/1.0.1/jackrabbit-oak-1.0.1-src.zip

Keybase proof

I hereby claim:

  • I am lsmith77 on github.
  • I am lsmith (https://keybase.io/lsmith) on keybase.
  • I have a public key whose fingerprint is 280C F185 F4AF A00F EE49 3F71 0D4E 225B 7B2F 7EDC

To claim this, I am signing this object:

<?php
interface ExceptionInterface
{
public function getMessage();
public function getCode();
public function getFile();
empty result
SELECT
n0.id AS id,
n0.path AS path,
n0.parent AS parent,
n0.local_name AS local_name,
n0.namespace AS namespace,
n0.workspace_name AS workspace_name,
n0.identifier AS identifier,