Skip to content

Instantly share code, notes, and snippets.

View ajaypatelbardoli's full-sized avatar

ajay patel ajaypatelbardoli

View GitHub Profile
@ajaypatelbardoli
ajaypatelbardoli / gist:09c047425032391c2445
Created October 10, 2014 16:07
RegistrationFormType
<?php
namespace XXXX\Bundle\UserBundle\Form\Type;
use Symfony\Component\Form\FormBuilderInterface;
use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;
class RegistrationFormType extends BaseType
{
public function __construct($dataClass)
{
@ajaypatelbardoli
ajaypatelbardoli / gist:18ef99a3d0bd1198debc
Created October 10, 2014 16:05
ProfileFormType Class
<?php
namespace XXXX\Bundle\UserBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class ProfileFormType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options)
<?php
/**
* Created by PhpStorm.
* User: software
* Date: 10/10/14
* Time: 1:10 PM
*/
namespace XXXX\Bundle\UserBundle\Entity;
<?php
namespace XXXX\Bundle\UserBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* Class User
* @ORM\Entity
* @ORM\Table(name="users")
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz
tar xzvf ImageMagick-6.8.9-1.tar.gz
cd ImageMagick-6.8.9-1/
./configure --prefix=/opt/imagemagick-6.8 && make
checkinstall
@ajaypatelbardoli
ajaypatelbardoli / gist:b357a4755e0a6f731330
Created August 18, 2014 13:34
solr single document delete
curl http://<SOLR-SERVER>/solr/<INSTANCE>/update/?commit=true -H "Content-Type: text/xml" -d "<delete><query>id:#PRODUCT_ID#</query></delete>"
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
"response": {
"numFound": 1948,
"start": 0,
"maxScore": 8.853471,
"docs": [
{
"id": "504344",
"title_t": "Hockey Jersey",
"score": 8.853471
},
@ajaypatelbardoli
ajaypatelbardoli / gist:3f56e1fd0b86d45cb7e9
Created May 5, 2014 10:58
Solr 4.4 + tomcat 6 + ubuntu 12.04
http://www.arborisoft.com/how-to-install-apache-solr-4-4-on-ubuntu-12-04/