Skip to content

Instantly share code, notes, and snippets.

View rafaelrinaldi's full-sized avatar

Rafael Rinaldi rafaelrinaldi

View GitHub Profile
@ohanhi
ohanhi / frp.md
Last active December 23, 2022 13:06
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@getify
getify / gist:7ae82fdc2e86bf66bcba
Last active March 27, 2022 19:50
List of ES6 books either out or in progress...
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@polarblau
polarblau / atf.js
Last active August 29, 2015 14:11
Apple trailers in fullscreen: save as bookmarklet, start a trailer video on trailers.apple.com, run the script.
javascript:(function(){try{var video=find('.moviePanel object embed');var origWidth=video.width,origHeight=video.height,origStyleWidth=video.style.width,origStyleHeight=video.style.height;onEnterFullscreen(function(){video.width='100%';video.height='100%';video.style.width='100%';video.style.height='100%';});onExitFullscreen(function(){video.width=origWidth;video.height=origHeight;video.style.width=origStyleWidth;video.style.height=origStyleHeight;});fullscreen(video);}catch(e){}function getVideoSize(video){return[video.width,video.height,video.style.width,video.style.height];}function setVideoSize(video,size){video.width=size[0];video.height=size[1];video.style.width=size[2];video.style.height=size[3];}function find(query){return document.querySelector(query);}function isFullscreen(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;}function onFullscreenChange(cb){document.addEventListener('fullscreenchange',cb,false);document.ad
function Track(src, spriteLength, audioLead) {
var track = this,
audio = document.createElement('audio');
audio.src = src;
audio.autobuffer = true;
audio.load();
audio.muted = true; // makes no difference on iOS :(
/* This is the magic. Since we can't preload, and loading requires a user's
input. So we bind a touch event to the body, and fingers crossed, the
@jashkenas
jashkenas / semantic-pedantic.md
Last active November 29, 2023 14:49
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@jashkenas
jashkenas / npm-publish-semver.coffee
Last active August 18, 2016 21:10
A little script to publish a "semantic" version of any npm package that uses real version numbers.
#!/usr/bin/env coffee
fs = require 'fs'
sh = require 'execSync'
config = JSON.parse fs.readFileSync 'package.json'
fs.renameSync 'package.json', 'package.json.real'
name = config.name = "#{config.name}-semver"
@danielfilho
danielfilho / braziljs-2014-talks.md
Last active November 27, 2022 21:04
Talks, slides and links from BrazilJS 2014

#BrazilJS 2014

Talks: slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini interview · slides · video
1 Frontend at Scale - The Tumblr Story Chris Miller interview · slides · video
1 Intro to GFX: Raw WebGL Nick Desaulniers interview · slides · video