Skip to content

Instantly share code, notes, and snippets.

View Couto's full-sized avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile
@MarvinAmador7
MarvinAmador7 / redux_v3.x.x.jsx
Created April 25, 2017 00:38 — forked from pcardune/redux_v3.x.x.jsx
This gist shows how to add support for redux-thunk and redux-promise-middleware to the flowtype libdefs for redux
// flow-typed signature: ba132c96664f1a05288f3eb2272a3c35
// flow-typed version: c4bbd91cfc/redux_v3.x.x/flow_>=v0.33.x
declare module 'redux' {
/*
S = State
A = Action
@pcardune
pcardune / redux_v3.x.x.jsx
Last active April 27, 2017 08:43
This gist shows how to add support for redux-thunk and redux-promise-middleware to the flowtype libdefs for redux
// flow-typed signature: ba132c96664f1a05288f3eb2272a3c35
// flow-typed version: c4bbd91cfc/redux_v3.x.x/flow_>=v0.33.x
declare module 'redux' {
/*
S = State
A = Action
@vasanthk
vasanthk / System Design.md
Last active November 14, 2024 11:31
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

Kirby + Patterns = <3

When I heard about Brad Frost's Patternlab for the first time at beyond tellerrand I was intrigued. The idea of splitting your design work for a website into simple modules or patterns isn't new and starts to become more and more of a standard. But organizing this into a very visual styleguide/patternlab seemed to make so much sense. Brad also introduced a very interesting approach with his separation of modules into categories, such as atoms, molecules and organisms.

I started porting Brad's patternlab app to Kirby, but it never really made it to something polished and it turned out for me after using it for Kirby's panel UI, that it's actually a pain in the ass to maintain such a pattern collection.

The problem of patternlab

The problem with such a styleguide or patternlab is that it exists next to the real thing. When you change something in your code base you also have to update the particular code for the pattern in patternlab. To be honest I went very quickly from being

@Avaq
Avaq / combinators.js
Last active September 26, 2024 18:53
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@bevacqua
bevacqua / books.md
Last active October 13, 2018 16:52
Books I plan on buying this week

Web Performance

  • High Performance Web Sites: Essential Knowledge for Front-End Engineers
  • High Performance JavaScript (Build Faster Web Application Interfaces)
  • Even Faster Web Sites: Performance Best Practices for Web Developers
  • Designing for Performance: Weighing Aesthetics and Speed

Web Design

  • Adaptive Web Design: Crafting Rich Experiences with Progressive Enhancement (2nd Edition) (Voices That Matter)
@staltz
staltz / migration-guide.md
Last active December 19, 2023 22:14
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  ```diff
  - foo
  + bar

Example:

Android & iOS "call-home" workaround

as explained by Matthias Strubel

If you disable mobile access on Android, you can still use an unprepared offline network. If you have mobile networks enabled and connect to a not prepared offline network, the smartphone will fall back to mobile wifi. Sometimes, there is a message, that gives you some chance to use it, but the Samsung phone I had for test purposes denied to work with LibraryBox (which is not prepared yet).

iOS5 or iOS6 introduced a call-home function, that checks for the internet. If it does not receive a specific answer (see below), it opens up a lightweight browser, where you usually can login in hotels (the captive portal). If you don't solve the connection issue with logging in, I think < iOS9 does not fall back to mobile network. I read, that iOS9 will partialle use mobile internet, when the wifi connection is bad. As vague this statement is, so low my knowledge is. Fact is, my prepared PirateBox does not bring my iOS9 iPhone back into mobile n

@paulirish
paulirish / what-forces-layout.md
Last active November 15, 2024 16:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@trodrigues
trodrigues / gist:3a575d78e552cec785e6
Created March 11, 2015 16:18
Flux implementations
Fluxxor
Tuxedo
nexus-flux
Marty
Reflux
Fluxy