Skip to content

Instantly share code, notes, and snippets.

View lucadegasperi's full-sized avatar

Luca Degasperi lucadegasperi

View GitHub Profile
@lucadegasperi
lucadegasperi / thoughts.md
Last active September 22, 2020 09:56
Some ui design thoughts

My Design Thoughts as of 30/01/2020

Tooltips Modals and Alerts

  • tooltips should exist outside the context of the element they are attached to. This is to prevent style leaks or hidden overflows on the element they are attached to
  • Same principle applies to modals / alerts and so forth they should live inside a portal

Spacing

  • Spacing between components should be given by a parent component.
  • A component should not have any knowledge about its sorroundings.
  • A Text node should never be left alone with other non text nodes (it should always be wrapped in a )

Keybase proof

I hereby claim:

  • I am lucadegasperi on github.
  • I am lucadegasperi (https://keybase.io/lucadegasperi) on keybase.
  • I have a public key whose fingerprint is 8432 7B35 DAEE 8A36 E8FC 3D57 675C F4C7 C1F9 B664

To claim this, I am signing this object:

@lucadegasperi
lucadegasperi / MetaCollection
Last active August 29, 2015 14:28
Meta collection in laravel
class MetaCollection extends Collection
{
public function __get($name)
{
return $this->getValue($name);
}
public function getValue($name, $default = null)
{
$m = $this->filter(function ($meta) use ($name) {
@lucadegasperi
lucadegasperi / SassMeister-input.scss
Created April 26, 2015 17:33
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// per ogni tema dichiaro la palette
$themes: (
theme1: (
base-color: red
),
@lucadegasperi
lucadegasperi / SassMeister-input.scss
Created April 26, 2015 17:24
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// per ogni tema dichiaro la palette
$themes: (
theme1: (
base-color: red
),
@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
@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 / 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());
}
<!-- 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 / helloworld.txt
Created January 24, 2013 14:33
hello world
Hello World To You!