Skip to content

Instantly share code, notes, and snippets.

View pboethig's full-sized avatar

Peter Böthig pboethig

  • München
View GitHub Profile
<project name="Testproject" default="dist" basedir=".">
<description>
simple example build file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init">
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
Documentation=https://docs.mongodb.org/manual
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
<?php
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use AppBundle\Command\CreateUserCommand;
class CreateUserCommandTest extends KernelTestCase
{
public function testExecute()
{
<?php
// src/AppBundle/Command/CreateUserCommand.php
namespace AppBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateUserCommand extends Command
{
aMoreCuteFunction: function (a, e)
{
var test = (a,e) => this.property + ' istn it?';
}
@pboethig
pboethig / that
Last active August 22, 2016 18:25
aCuteFuction: function (a, e)
{
//very ugly but necessary to get access to the function scope of the outer function
var that=this;
var test = function(e, a){
//return closure function value
return that.property;
}
}
extends layout
block content
.container
p
| This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.
p
doctype html
html(lang='en')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(name='viewport', content='width=device-width, initial-scale=1')
// The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags
meta(name='description', content='')
meta(name='author', content='')
title Jumbotron Template for Bootstrap
extends layout
block content
.container
form(method="post", action="contact/send")
.form-group
label Name
input.form-control(type="text",name="name", placeholder="Enter Name")
.form-group
label Email
@pboethig
pboethig / app.js
Last active August 21, 2016 09:57
var express = require('express');
var path = require('path');
var bodyParser = require('body-parser');
var nodeMailer = require('nodemailer');
var app = express();
app.set('views', path.join(__dirname,'views'));
app.set('view engine','jade');