Skip to content

Instantly share code, notes, and snippets.

Lukas Rosenstock LukasRos

Block or report user

Report or block LukasRos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@LukasRos
LukasRos / compileDesignDocument.php
Created Mar 21, 2017
CouchDB Design Document Manager
View compileDesignDocument.php
<?php
require_once "vendor/autoload.php";
use MatthiasMullie\Minify\JS;
$baseName = $argv[1];
if (!is_dir($baseName)) {
echo "Could not find directory ".$baseName.".\n";
exit(-1);
View keybase.md

Keybase proof

I hereby claim:

  • I am LukasRos on github.
  • I am lukasrosenstock (https://keybase.io/lukasrosenstock) on keybase.
  • I have a public key whose fingerprint is 090D 2DBE 7884 222C A2CB 51E7 27E4 84CB C325 4A1B

To claim this, I am signing this object:

@LukasRos
LukasRos / test.php
Created Apr 29, 2014
Passing data from PHP to JS
View test.php
<?php
$data = array('key1' => '</script>', 'key2' => 'hello world');
?>
<html>
<head>
<title>Test</title>
<script type="text/javascript">
var data = <?php echo json_encode($data); ?>;
</script>
</head>
View actions.class.php
/**
* Executes hostMeta action
*
* @param sfRequest $request A request object
*/
public function executeHostMeta(sfWebRequest $request)
{
$this->getResponse()->setContentType("application/xrd+xml");
return sfView::SUCCESS;
}
View routing.yml
# /.well-known/host-meta
wk_host_meta:
url: /.well-known/host-meta
param: { module: default, action: hostMeta }
View TumblrOpenGraph.xhtml
{block:IndexPage}
<title>{Title}</title>
<meta property="og:title" content="{Title}" />
<meta property="og:type" content="blog" />
<meta property="og:image" content="{PortraitURL-48}"/>
<meta property="og:description" content="{MetaDescription}" />
{/block:IndexPage}
{block:PermalinkPage}
<title>{PostTitle} - {Title}</title>
<meta property="og:title" content="{PostTitle}" />
You can’t perform that action at this time.