Skip to content

Instantly share code, notes, and snippets.

<?php
require 'vendor/autoload.php';
use Platformsh\Client\PlatformClient;
if (!empty($_ENV['PLATFORM_ENVIRONMENT'])) {
$env_variables = json_decode(base64_decode($_ENV['PLATFORM_VARIABLES']));
$client = new PlatformClient();
$token = $env_variables->deploy_token;
$client->getConnector()->setApiToken($token, 'exchange');
$projects = $client->getProjects();
if ($projects) {
<?php
function data_uri($filename) {
$mime = mime_content_type($filename);
$data = base64_encode(file_get_contents($filename));
return "data:$mime;base64,$data";
}
$content = file_get_contents('oldfile.html');
<?php class source extends Mustache_Template {
private $lambdaHelper;
public function renderInternal(Mustache_Context $context, $indent = '') {
$this->lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context);
$buffer = '';
$buffer .= $indent . '<div class="page" id="page">';
$buffer .= "\n";
if ($partial = $this->mustache->loadPartial('organisms-header')) {
$buffer .= $partial->renderInternal($context, ' ');
### Keybase proof
I hereby claim:
* I am kolin on github.
* I am kolin (https://keybase.io/kolin) on keybase.
* I have a public key whose fingerprint is 77E7 1BF5 1E76 1663 41B6 5EC0 6436 4116 4E28 A3FC
To claim this, I am signing this object:
#!/bin/sh
if [ -w "$1" ] && [ -r "$1" ]; then
mv "$1" ~/.trash/
else
echo "$0: $1: unknown file or directory"
fi
exit 0