This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Random Background Color</title> | |
<style> | |
h1 { color: white; text-align: center; font-family: sans-serif; } | |
</style> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/capistrano" | |
set :application, "your_app" | |
# multistage | |
set :stages, ["staging", "production"] | |
set :default_stage, "staging" | |
require "capistrano/ext/multistage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="my-project" default="build"> | |
<target name="build" depends="phpunit" /> | |
<target name="composer" description="Installing dependencies with Composer"> | |
<exec executable="wget" failonerror="true"> | |
<arg value="-nc" /> | |
<arg value="http://getcomposer.org/composer.phar" /> | |
</exec> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## To remove a file extension from a given file | |
## Load the following function | |
rmext () { | |
if test -f "$1" | |
then | |
F=$1 | |
E=${F#*.} | |
mv $1 `basename $1 .$E`; | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ form_widget(form.post_image, { 'attr': {'multiple': 'multiple' }}) }} | |
$form = $this->createFormBuilder() | |
->add('files','file',array( | |
"attr" => array( | |
"accept" => "image/*", | |
"multiple" => "multiple", | |
) | |
)) | |
->getForm(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\HttpFoundation\File\File; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
/** | |
* @Entity | |
*/ | |
class Document | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initializeMaps() { | |
var GOOGLE_API_KEY = ""; | |
var location = "Bristol"; | |
var country = "UK"; | |
var geocoder = new google.maps.Geocoder(); | |
var markerBounds = new google.maps.LatLngBounds(); | |
var map = new google.maps.Map(document.getElementById( "map_canvas" ), { |