I hereby claim:
- I am mlebkowski on github.
- I am puck (https://keybase.io/puck) on keybase.
- I have a public key whose fingerprint is AFB4 769E 17CE 7A93 AB41 B313 DB1B 67F7 129A 7370
To claim this, I am signing this object:
<?php | |
// Node[] -> (map) -> NodeTranslation[] -> (map) -> Category[] -> slice | |
// Purely „functional” PHP: | |
$parents = array_slice(array_map(function (NodeTranslation $nt) | |
{ | |
return new Category($nt->getTitle(), $nt->getNode()->getId(), $nt->getSlug()); | |
}, array_map(function (Node $node) | |
{ |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
<?php | |
class PaymentsFacade extends Container | |
{ | |
private $requiredKeys = [ | |
'factory.project', | |
'price-calculator', | |
'repository.plan', | |
'repository.coupon', | |
'service.authorize-card', |
<?php | |
interface EmailNotifierInterface { | |
/** | |
* Client was successfully charged for a project | |
* | |
* context: payment_history model (with access to project & invoice) | |
*/ | |
const NOTIFICATION_CHARGED = 'charged'; | |
<?php | |
$retry = [ | |
"today" => 'failure-notification', | |
'+1 day' => 'none', | |
'+3 days' => 'failure-notification', | |
'+1 week' => 'failure-notification', | |
'+2 weeks' => 'failure-notification, suspend' | |
]; | |
?> |
<?php | |
namespace Metricso\Fetcher\ObjectProcessor ; | |
use Generator ; | |
use Metricso\Model\Fb\AppUser ; | |
use Metricso\Model\Fb\FbPage ; | |
use Metricso\Model\Fb\FbPageFeedQuery ; | |
class PageProcessor extends AbstractObjectProcessor implements ObjectProcessorInterface, UsingAlternateTokensInterface { | |
private $queryFactory ; | |
private $tokenSource ; |
<?php | |
class QueryDependent | |
{ | |
/** | |
* @var Callable | |
*/ | |
private $queryFactory; |
#!/usr/bin/env bash | |
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x | |
APP="$1"; IMAGE="dokku/$APP" | |
CRONTABS_DIR=$DOKKU_ROOT/.crontab | |
CONFIG_FILE=$CRONTABS_DIR/$APP.conf | |
mkdir -p "$CRONTABS_DIR"; |
function solution(N) { | |
// sorry, not really my kind of thing, but here’s a goat: | |
console.log("\n\ | |
\n\ | |
/) (\\ \n\ | |
)\\.:::::::::./( \n\ | |
\\( o o )/ \n\ | |
'-./ / _.-'`-. \n\ | |
( oo ) / _ \\ \n\ |
I hereby claim:
To claim this, I am signing this object: