Skip to content

Instantly share code, notes, and snippets.

View CaptainJojo's full-sized avatar

Jonathan Jalouzot CaptainJojo

View GitHub Profile
/**
* @Route("/")
*/
public function home()
{
$ssr = $this->renderJs();
return $this->render('home.html.twig', ['ssr' => $ssr]);
}
<template>
<div id="app">
{{ message }}
</div>
</template>
<script>
export default {
data() {
return {
message: 'Hello World'
<?php
namespace AppBundle\Service\VersionStrategy;
use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface;
class JavascriptBusterVersionStrategy implements VersionStrategyInterface
{
/**
* The manifest object containing for each entry
{
"presets": ["es2015", "react"]
}
/**
* Goes through the given directory to return all files and folders recursively
* @author Ash Blue ash@blueashes.com
* @example getFilesRecursive('./folder/sub-folder');
* @requires Must include the file system module native to NodeJS, ex. var fs = require('fs');
* @param {string} folder Folder location to search through
* @returns {object} Nested tree of the found files
*/
// var fs = require('fs');
function getFilesRecursive (folder) {
@CaptainJojo
CaptainJojo / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console