I hereby claim:
- I am stefanlindbohm on github.
- I am kolizz (https://keybase.io/kolizz) on keybase.
- I have a public key ASCFO_Vri1lXrvU7n2PO5sb43XiMBciLKmNR-LJwRR1vTQo
To claim this, I am signing this object:
.font-size-leading(@font-size, @leading-ratio, @baseline-end-ratio) { | |
@leading: @baseline*round(@leading-ratio); | |
@baseline-end-distance: round(@font-size * @baseline-end-ratio + (@leading - @font-size) / 2); | |
font-size: @font-size; | |
line-height: @leading; | |
padding-top: @baseline-end-distance; | |
padding-bottom: @leading - @baseline-end-distance - (@baseline * (@leading-ratio - 1)); | |
} |
postParameterNameComponents("postdata[with][dimensions]") | |
-> ["postdata", "with", "dimensions"] |
// Class implementation with inheritance. | |
// | |
// Creates a constructor function with all the properties of ``params`` and | |
// keeps the ``constructor`` property of the prototype intact. | |
// | |
// Chains the object of special ``params`` key ``Extends`` on the prototype | |
// and prevents multiple calls to initialize in a MooTools Class compatible | |
// way. Property ``parent`` of the prototype is set to the chained object. | |
var Class = function(params) { | |
this.createConstructor(); |
// Defaults: inconsistent calls | |
class Default { | |
init(first: Int, second: Int) { } | |
func method(first: Int, second: Int) { } | |
} | |
func defaultFunction(first: Int, second: Int) { } | |
let defaultObject = Default(first: 1, second: 1) |
I hereby claim:
To claim this, I am signing this object:
// | |
// JSON.swift | |
// BonAppetit | |
// | |
// Created by Stefan Lindbohm on 17/02/15. | |
// Copyright (c) 2015 Stefan Lindbohm. All rights reserved. | |
// | |
import Foundation |
This is some code golfing that got out of hand. Written in a playground and as such uses simplistic test helpers that just return output strings. Copy and paste into Swift Playgrounds on iOS or a playground in XCode to run.
t.prefs_.set('color-palette-overrides',["#000000", "#ff6d67", "#59f68d", "#f3f89d", "#c9a8fa", "#ff92d0", "#99ecfd", "#c7c7c7", "#676767", "#ff6d67", "#59f68d", "#f3f89d", "#c9a8fa", "#ff92d0", "#99ecfd", "#ffffff"]); | |
t.prefs_.set('foreground-color', "#f9f9f4"); | |
t.prefs_.set('background-color', "#272936"); | |
t.prefs_.set('cursor-color', 'rgba(187,187,187,0.5)'); |