Skip to content

Instantly share code, notes, and snippets.

🎶 around the world 🕺🎶

Philipe Fatio fphilipe

🎶 around the world 🕺🎶
View GitHub Profile
EugeneTheDev / DotsLoaders.kt
Created Mar 18, 2021
Dots loading animations with Jetpack Compose
View DotsLoaders.kt
import androidx.compose.animation.core.*
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
xavierLowmiller / Shimmer.swift
Created Oct 12, 2020
Slide-to-Unlock animation in SwiftUI
View Shimmer.swift
import SwiftUI
struct Shimmer: AnimatableModifier {
private let gradient: Gradient
init(sideColor: Color = Color(white: 0.25), middleColor: Color = .white) {
gradient = Gradient(colors: [sideColor, middleColor, sideColor])

'Users hate change'

This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

View obike-zurich.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
solnic / active-model-validations-vs-dry-validation.txt
Last active Dec 7, 2015
ActiveModel/ActionController::Parameters vs Dry::Validation::Schema
View active-model-validations-vs-dry-validation.txt
Calculating -------------------------------------
134.000 i/100ms
dry-validation 2.145k i/100ms
1.499k (±11.5%) i/s - 7.504k
dry-validation 22.300k (±10.5%) i/s - 111.540k
rbobbins /
Last active Feb 11, 2020
Notes from "Protocol-Oriented Programming in Swift"

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control
View Complex.swift
struct Complex<T: FloatLiteralConvertible> {
var real: T
var imaginary: T
func +(lhs: Complex<Double>, rhs: Complex<Double>) -> Complex<Double> {
return Complex<Double>(real: lhs.real + rhs.real, imaginary: lhs.imaginary + rhs.imaginary)
View random.swift
import Darwin
extension Int {
static func random() -> Int {
return Int(arc4random())
static func random(range: Range<Int>) -> Int {
return Int(arc4random_uniform(UInt32(range.endIndex - range.startIndex))) + range.startIndex
mattt / NSDecimalNumber.swift
Last active Apr 27, 2021
NSDecimalNumber Additions for Swift
View NSDecimalNumber.swift
import Foundation
// MARK: - Comparable
extension NSDecimalNumber: Comparable {}
public func ==(lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool {
return == .OrderedSame
JunichiIto /
Last active Sep 14, 2021
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value