Skip to content

Instantly share code, notes, and snippets.

View lucadegasperi's full-sized avatar

Luca Degasperi lucadegasperi

View GitHub Profile
@lucadegasperi
lucadegasperi / gist:1154022
Created August 18, 2011 13:04
Example view.php for Tiles
<section class="social">
<?php if($title) : ?>
<h1><?php echo $title; ?></h1>
<?php endif; ?>
<?php if($description) : ?>
<p><?php echo $description; ?></p>
<?php endif; ?>
<ul>
<?php foreach($social_networks as $sn) : ?>
<li>
@lucadegasperi
lucadegasperi / bad-slideshow.html
Created September 28, 2011 10:21
Bad Slideshow Markup
<div class="slideshow">
<a href="#" class="prev" title="Show Previous Image">Previous</a>
<ul>
<li>
<img src="image-1.jpg" alt="Image 1"/>
</li>
<li>
<img src="image-2.jpg" alt="Image 2"/>
</li>
<li>
@lucadegasperi
lucadegasperi / good-slideshow.html
Created September 28, 2011 10:29
Good Slideshow Markup
<div class="slideshow">
<ul>
<li>
<img src="image-1.jpg" alt="Image 1"/>
</li>
<li>
<img src="image-2.jpg" alt="Image 2"/>
</li>
<li>
<img src="image-3.jpg" alt="Image 3"/>
@lucadegasperi
lucadegasperi / even-better-slideshow.html
Created September 28, 2011 11:16
Even Better Slideshow Markup
<div class="slideshow">
<ul>
<li>
<img src="image-1.jpg" alt="Image 1"/>
</li>
</ul>
</div>
@lucadegasperi
lucadegasperi / declaration-after-context.css
Created August 19, 2012 22:49
Context Based CSS Examples
.titlebar
{
/* titlebar css rules go here */
}
.titlebar .button
{
/* button's titlebar context modified rules go here */
}
@lucadegasperi
lucadegasperi / helloworld.txt
Created January 24, 2013 14:33
hello world
Hello World To You!
<!-- in the body -->
<script src="path/to/jquery.js"></script>
<script src="path/to/baseline.js"></script>
<script>
$(document).ready(function(){
$('img').baseline(24);
});
</script>
</body>
</html>
@lucadegasperi
lucadegasperi / ProjectController.php
Created April 19, 2014 08:51
Controller Cleanup + Interface
<?php
class ProjectController extends BaseController implements ProjectCreatorDelegate
{
public function store()
{
$creator = new ProjectCreator($this);
return $creator->create(Input::all());
}
@lucadegasperi
lucadegasperi / checklist.md
Last active August 29, 2015 14:03
CMS Checklist

What are the features a modern CMS should have?

  • Multilingual but Localized
  • Shouldn't mess with HTML / CSS / JS
  • Built on modern foundations
  • Allow for different post types
  • Versioning of content
@lucadegasperi
lucadegasperi / Vagrantfile
Created September 28, 2014 20:10
Homestead Plus
VAGRANTFILE_API_VERSION = "2"
path = "#{File.dirname(__FILE__)}"
require 'yaml'
require path + '/scripts/homestead.rb'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
Homestead.configure(config, YAML::load(File.read(path + '/Homestead.yaml')), Vagrant.has_plugin?('vagrant-hostsupdater'))
end