Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
#!/bin/sh | |
# You might want to put this script in crontab, backup day by day. | |
# | |
# $ sudo -u git -H crontab -l | |
# $ 0 0 1 * * /path/to/your/BackupGitlab.sh | |
cd /home/git/gitlab | |
/usr/local/bin/bundle exec rake gitlab:backup:create RAILS_ENV=production |
# Apache + PHP | |
mod "apache", | |
:git => "git://github.com/webflo/boxen-puppet-apache.git" | |
mod "php", | |
:git => "git://github.com/webflo/puppet-php.git", | |
:ref => "fastcgi_webserver" | |
mod "apache_php", | |
:git => "git://github.com/webflo/puppet-apache_php.git" |
'mysql' => array( | |
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock' | |
) |
@font-face { | |
font-family: 'EntypoRegular'; | |
src: url('font/entypo.eot'); | |
src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
url('font/entypo.woff') format('woff'), | |
url('font/entypo.ttf') format('truetype'), | |
url('font/entypo.svg#EntypoRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
Put this code on the page where the form you want to track resides. Some other examples are currently passed around the web with varying quality. This is one that will work as long as your form tag has an id=
or name
attribute.
You don´t have to change this code to be able to track form abandonment in your shopping cart, order form or whatever form you want.
This sends events to Google Analytics when a user focuses somewhere not in a field after having focused on a input field. You won´t know for how long users focused on respective fields, or the actual conversion rate in the form using this, but it might be a start.
A tool that provides more insight both over time and per field, is Form Analytics wich helps you optimize your online forms. For instance, it measures dropout rate, average field input length, conversion rate and average time per field. All which provides great insights in the most overlooked, yet important part of you site.
Anyway, here´s the code:
There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.
I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:
<?xml version="1.0" encoding="UTF-8" ?> | |
<rss version="2.0" | |
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
xmlns:wfw="http://wellformedweb.org/CommentAPI/" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:wp="http://wordpress.org/export/1.2/" | |
> |
var address, sitemap, system; | |
sitemap = require('webpage').create(); | |
system = require('system'); | |
if (system.args.length === 1) { | |
console.log('Usage: pagespeed.js <some DOMAIN>'); | |
phantom.exit(1); | |
} else { |