Skip to content

Instantly share code, notes, and snippets.

{
"directory": "components"
}
@michaelcullum
michaelcullum / contact.html.twig
Created August 23, 2013 16:31
Contact Form for Silex
{% extends layout %}
{% block body %}
<div id="main">
<h2>Contact me</h2>
<p>For queries about anything on this website, or for job quotations, please contact me using the contact form below or via <a href="mailto:[email protected]">email</a>.</p>
<form action="#" method="post">
{{ form_start(form) }}
{{ form_errors(form) }}
@mac2000
mac2000 / ExampleForm.php
Created September 2, 2013 07:51
Silex Reusing Forms Example
<?php // src/Acme/Form/Type/ExampleForm.php
namespace Acme\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints as Assert;
class ExampleForm extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options) {
$builder->add('email', 'email', array(
@mitchellvanw
mitchellvanw / laravel-application-creater
Last active December 30, 2015 11:09
Install the Laravel Application Creator globally on your *nix machine.
# Installation
curl -o laravel.phar http://laravel.com/laravel.phar
chmod 755 laravel.phar
mv laravel.phar /usr/local/bin/laravel
# Usage
laravel new <application_name>
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@Nyholm
Nyholm / gist:4c2a960531d5d81c062b
Last active November 30, 2017 19:58
Display flash messages in Symfony2
{# Check if we got a session without creating one #}
{% if app.request.hasPreviousSession %}
{# Check if we got some flash messages #}
{% if app.session.flashbag.peekAll()|length > 0 %}
<div id="flash">
{# Loop all types of flash messages #}
{% for type, flashMessages in app.session.flashbag.all() %}
{# For all flash messages with this type #}
{% for idx, flashMessage in flashMessages %}
<div class="flash-item flash-type-{{ type }}">
@facine
facine / __INDEX.txt
Last active August 28, 2024 05:45
Drupal 8 - Examples
# Taxonomy terms:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php
# Menu links:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php
# File items:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php
# Nodes:
@aslafy-z
aslafy-z / howto-hearthstone-archlinux.md
Last active November 4, 2022 11:17
Install Hearthstone on Archlinux

Dependencies

Installation

  • Open PlayOnLinux
@pokisin
pokisin / instalacion.md
Last active June 29, 2023 21:23
Instalar LAMP en arch linux (Manjaro)

Pasos para instalar LAMP en Manjaro

  1. Abrimos la terminal y ejecutamos la siguiente linea para actualizar la base de datos de los paquetes
  sudo pacman -Syu
  1. Instalamos el apache y ejecutamos lo siguiente
  sudo pacman -S apache
@tomsihap
tomsihap / gist:e703b9b063ecc101f5a4fc0b01a514c9
Created December 23, 2018 14:46
Install NVM in Ubuntu 18.04 with ZSH
# Find the latest version on https://github.com/creationix/nvm#install-script
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Add in your ~/.zshrc the following:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
$ source ~/.zshrc