Skip to content

Instantly share code, notes, and snippets.

View rafaelrinaldi's full-sized avatar

Rafael Rinaldi rafaelrinaldi

View GitHub Profile
{
"estacao-jabaquara": {
"lines": [
"linha-1-azul"
],
"location": {
"address": "Term. Jabaquara, São Paulo, Brazil",
"latitude": -23.647066,
"longitude": -46.63954
},
@rafaelrinaldi
rafaelrinaldi / README.md
Created April 27, 2023 16:06
Easily switch between Alacritty themes

alacritty-theme

themes/

Create a themes/ folder under ~/.config/alacritty.

~/.config/alacritty
❯ ls -h
alacritty.yml theme.yml     themes
#!/usr/bin/env bash
# BASH fuzzyclock
# by Corey Mwamba
#
export TEXTDOMAINDIR="/usr/share/locale"
export TEXTDOMAIN=bash-fuzzy-clock
hr=($(date '+%_H'))
min=10#$(date '+%M')
nearly=$"nearly"
@rafaelrinaldi
rafaelrinaldi / iOSVersion.js
Created June 27, 2013 03:11
Checks which iOS version is running.
// http://stackoverflow.com/a/14223920/339827
function iOSVersion() {
var match = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/),
version = [
parseInt(match[1], 10),
parseInt(match[2], 10),
parseInt(match[3] || 0, 10)
];
return parseFloat(version.join('.'));
const assert = require("assert");
class Doc {
constructor(layers) {
this.layers = layers.reduce((accumulator, current) => {
const { id, properties } = current;
return {
...accumulator,
[id]: properties,
};
import { H1, Text, View } from '@doppio/core';
import { Alert, Button, Checkbox, Radio, Spacer, TextArea } from '@doppio/elements';
import { RadioGroup } from '@doppio/patterns';
import * as React from 'react';
type DrinkSize = '12' | '16';
type DrinkType = 'Espresso' | 'Doppio' | 'Cappuccino';
const modifiers = ['Mocha', 'Vanilla', 'Caramel'];
Asana token naming proposal
1. Sentiment: default/neutrals, success, warning, danger, upsell, selected, beta, information
2. Usage: background, text, icon, border
3. Prominence: default, weak, medium, strong
4. Interaction: default, hover, active, disabled
[sentiment-][usage][-prominence][-interaction]
- Stored as Figma color styles
@rafaelrinaldi
rafaelrinaldi / index.js
Created January 19, 2017 16:02
ESLint custom rule to ensure TODO comments to follow a specific format
module.exports = {
meta: {
docs: {
description: 'requires a TODO to be specified either with a task number or URL and a message',
category: 'Best Practices',
recommended: true
},
schema: []
},
@rafaelrinaldi
rafaelrinaldi / netshoes.md
Last active March 2, 2021 11:29
Vaga desenvolvedor front-end Netshoes

Desenvolvedor front-end Netshoes

  • Regime: CLT
  • Requisitos
    • Estar apto a descrever o que acontece do request até o render de uma página
    • Ferramentas de controle de versão, em especial o Git
    • HTML, CSS e JavaScript
      • Gerenciamento de pacotes
      • Conhecer ferramentas de build, em especial o Grunt
  • Conhecer pré-processadores, em especial o Sass
@rafaelrinaldi
rafaelrinaldi / README.md
Last active January 22, 2021 09:04
`.mov` to `.gif` using QuickTime and Photoshop

.mov to .gif using QuickTime and Photoshop

This is my prefered way to create GIF animations for demos and whatnot.

Steps

  1. QuickTime » File » New Screen Recording
  2. Select area to record » Start recording your thing
  3. File » Export » Select max resolution available » Save
  4. Photoshop » Import » Video Frames to Layers (no need to follow step 2 if not on retina screen)