Skip to content

Instantly share code, notes, and snippets.

View maccevedor's full-sized avatar

Mauricio Acevedo Rueda maccevedor

View GitHub Profile
@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
@maccevedor
maccevedor / commit
Created October 30, 2014 14:23
Clone Commit
Github Tree View If the repo is in github, you can navigate to the tree view of the repo at https://github.com/<repo_name>/tree/<commit_sha> Then clicking on the Download ZIP button on the right-hand navigation bar will download the codes of that repo up to the specified commit.
Clone The Repo And Checkout The Specific Commit This will set the HEAD of your master to point to commit_sha. git clone -n <repo_name> git checkout <commit_sha>
Clone The Repo And Checkout The Specific Commit Into A Branch This will set the HEAD of your new_branch to point to commit_sha. git clone -n <repo_name> git checkout -b <new_branch> <commit_sha>