Skip to content

Instantly share code, notes, and snippets.

View maccevedor's full-sized avatar

Mauricio Acevedo Rueda maccevedor

View GitHub Profile
@maccevedor
maccevedor / push
Created July 5, 2014 15:42
Forzar actualizar todo desde el servidor remoto(cuidado si tienes archivos locales en esta carpeta lso elimina)
git push --all origin
@maccevedor
maccevedor / file
Created July 7, 2014 21:47
Aceptar un tipo definido de archivos con html5
<h1>Match all image files (image/*)</h1>
<p><label>image/* <input type="file" accept="image/*"></label></p>
<h1>Match all video files (video/*)</h1>
<p><label>video/* <input type="file" accept="video/*"></label></p>
<h1>Match all audio files (audio/*)</h1>
<p><label>audio/* <input type="file" accept="audio/*"></label></p>
<h1>Match all image files (image/*) and files with the extension ".someext"</h1>
@maccevedor
maccevedor / mac
Created July 22, 2014 18:24
Exemplo de para dar permisos a una carpeta en mac
sudo chmod -R 777 /Applications/Calculator.app
@maccevedor
maccevedor / symfony.php
Created July 23, 2014 18:50
Ejemplo de comodines en symfony {slug}
# src/MDW/DemoBundle/Resources/config/routing.yml
blog_mostrar:
pattern: /blog/{slug}
defaults: { _controller: MDWDemoBundle:Blog:show }
@maccevedor
maccevedor / history
Last active August 29, 2015 14:04
History Terminal
history | grep phrase_to_search_for
@maccevedor
maccevedor / selectSymfony.php
Created July 25, 2014 14:27
Consulta Symfony Doctrine
$em = $this->getDoctrine()->getEntityManager();
$dql = "select a from MDWDemoBundle:Articles a";
$query = $em->createQuery($dql);
$articulos = $query->getResult();
@maccevedor
maccevedor / push
Created July 28, 2014 14:33
Comando BitBucket iniciar un proyecto
echo "Mauricio Acevedo|" >> contributors.txt
git add contributors.txt
git commit -m 'Initial commit with contributors'git push -u origin master
@maccevedor
maccevedor / new_gist_file_0
Created July 28, 2014 18:22
Validar Formularios en Symfony
/**
* @var string $title
*
* @ORM\Column(name="title", type="string", length=255)
* @Assert\NotNull(message="Debe escribir un titulo")
*/
private $title;
@maccevedor
maccevedor / terminal
Created August 5, 2014 15:37
Mac OS dar acceso a las subCarpetas
sudo chmod -R 777 app/*.*
@maccevedor
maccevedor / Terminal
Created August 21, 2014 13:48
Delete files mac , Applications
Sudo rm -Rf file