Skip to content

Instantly share code, notes, and snippets.

View aurelben's full-sized avatar

Aurelien Pigot aurelben

View GitHub Profile
int isoption_ok(char *option, char *val)
{
char *validOption[] = {
"--ip", "--port"
};
int i;
int j;
j = 0;
while(validOption[j]){
#include "my_cat.h"
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int my_cat(char *file)
{
public function addPostChanAction(Request $request)
{
$session = $request->getSession();
$chanid = $session->get('chanid');
$post = new Post();
$user = $this->getUser();
$form = $this->createForm(new PostChanType(), $post);
<?php
namespace Smartnode\TalkBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use JMS\Serializer\Annotation\Groups;
use JMS\Serializer\Annotation\VirtualProperty;
@aurelben
aurelben / Smartnode_ChanType.php
Last active August 29, 2015 13:57
Smartnode Talk
<?php
namespace Smartnode\TalkBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class ChanType extends AbstractType
{