Symfony Training Cheat Sheet
This sheet is a quick overview on generate a basic application and then adding scaffolding.
##TOC
<link href="touch-icon-iphone.png" rel="apple-touch-icon-precomposed" /> | |
<link href="touch-icon-ipad.png" rel="apple-touch-icon-precomposed" sizes="72x72" /> | |
<link href="touch-icon-iphone4.png" rel="apple-touch-icon-precomposed" sizes="114x114" /> | |
<link href="touch-icon-ipad3.png" rel="apple-touch-icon-precomposed" sizes="144x144" /> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Embedded SVG</title> | |
</head> | |
<body> | |
<h1>Embedded SVG</h1> | |
<a href="http://www.sitepoint.com/add-svg-to-web-page/">Source of this stuff.</a> | |
<!-- SVG code --> |
<?php | |
$options['ssh-options'] = '-o PasswordAuthentication=no -i /home/YOURUSERNAME/.ssh/id_rsa'; |
#!/usr/bin/env bash | |
tmpfile=/tmp/vhostfile | |
vhost=/etc/apache2/sites-available/$1 | |
echo "creating $vhost for directory /var/sites/$2" | |
echo "<VirtualHost *:80>" > $tmpfile | |
echo " DocumentRoot /var/sites/$2" >> $tmpfile | |
echo " ServerName $1" >> $tmpfile | |
echo " RewriteEngine On" >> $tmpfile | |
echo " RewriteOptions inherit" >> $tmpfile |
#!/bin/bash | |
#Current (Remote) Branch | |
currentbranch="" | |
#Fetch from the remote branch | |
echo "polling..." | |
if [ -n "$currentbranch" ]; then | |
git fetch $currentbranch | |
else |
#!/bin/bash | |
#Load all mysql backups in directory | |
FILES=/you/restore/db/*.mysql | |
if [ ${#FILES[@]} -gt 0 ]; then | |
#Loop through files | |
for f in $FILES | |
do | |
#Alert the user |
#!/bin/bash | |
drush vset cache 0 | |
drush vset preprocess_css 0 | |
drush vset preprocess_js 0 |
sudo drush dl drush --destination='/usr/share' |
This sheet is a quick overview on generate a basic application and then adding scaffolding.
##TOC
#!/bin/bash | |
#Load all mysql backups in directory to mysql | |
#database is filename | |
#drop existing database, import database | |
#clear database script folder | |
# | |
#Takes parameters $1 -u $2 username_value $3 -p $4 password_value (example for $files) -f database/folder/*.mysql | |
#Set $FILES value to location of your database file or use parameter $5 $6 | |
#FILES="$6" |