Skip to content

Instantly share code, notes, and snippets.

View lucalanca's full-sized avatar

João Figueiredo lucalanca

View GitHub Profile
@lucalanca
lucalanca / input.scss
Last active August 29, 2015 14:04
Font specs in Sass using maps
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
// ----------------------
// HELPER FUNCTIONS HERE
// ----------------------
@function size($multiplier) {

308: 1h

309: 2h

310: 4h (maybe more with random asyncronous headaches)

311: 2h

@lucalanca
lucalanca / angular-service.coffee
Last active August 29, 2015 14:05
Angular Service
do ->
angular
.module('app')
.factory('Foo', Foo)
Foo = (foo, bar) ->
# Variables (all should be private)
hello = "hello"
world = "world"
@lucalanca
lucalanca / gist:c88d1c9e2104e20ed6ec
Last active August 29, 2015 14:05
Short Term Goals

Short-term Goals

  • start a big angular project from scratch with TDD
  • release first version of living styleguide generation on skeleton
  • extend grunt-angular-modules-graph to work properly under every project
  • take one week off to conduct first Personal Design Sprint on the Tech Scene personal project (you can ask me about it :) )
  • write one article about code quality (possibly porting it to a talk).
@lucalanca
lucalanca / SassMeister-input.scss
Created December 10, 2014 19:14
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
$s-gutter: 32px;
$s-gutter-xlarge : 3.5*$s-gutter;
$s-gutter-large : 3*$s-gutter;
@lucalanca
lucalanca / SassMeister-input.scss
Created August 20, 2015 13:22
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.3)
// ----
@mixin outer {
@content;
}
@mixin inner {
@lucalanca
lucalanca / SassMeister-input.scss
Created August 20, 2015 13:23
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.3)
// ----
@mixin outer {
@content;
}
@mixin inner {
@lucalanca
lucalanca / SassMeister-input.scss
Created February 23, 2016 08:13
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@function imagePath($imageName) {
@return 'siroop.ch/#{$imageName}';
}
.foo {
background-image: url(imagePath('header.png'));
# remove falsey elements from array
const compact = (arr) => arr.filter(Boolean)
'use strict';
const FIELD_TYPE_BLACKLIST = ['file', 'reset', 'submit', 'button'];
const isFieldSerializable = (field) => field.name && FIELD_TYPE_BLACKLIST.indexOf(field.type) === -1
const formFieldsReducer = (state, field) => {
if (!isFieldSerializable(field)) {
return state;
}