Skip to content

Instantly share code, notes, and snippets.

View brunobertolini's full-sized avatar
🎯
Focusing

Bruno Bertolini brunobertolini

🎯
Focusing
View GitHub Profile
import React from 'react'
import { connect } from 'react-redux'
import { setLanguage } from 'redux-i18n'
import { BrowserRouter as Router } from 'react-router-dom'
import Route from 'services/router'
import * as authData from 'data/auth'
import * as persist from 'data/persist'
@brunobertolini
brunobertolini / flexbox.js
Last active February 27, 2018 17:29
Based on https://gist.github.com/jorilallo/a9e60b3ce3f7373e3c65a50d65e8e1e8 with propTypes instead of Flow, and using styled-by
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import styledBy from 'styled-by'
const GlobalCssValues = ['initial', 'inherit', 'unset']
const WrapValue = ['nowrap', 'wrap', 'wrap-reverse', ...GlobalCssValues]
const JustifyValue = [
'center',
'start',
@brunobertolini
brunobertolini / .env
Last active August 7, 2018 19:44
Instance setup scripts
#!/bin/bash
import * as R from 'ramda'
export const between = (num: number, min: number, max: number) =>
R.max(min, R.min(num, max))
export const paginate = (
records: number,
limit: number = 10,
current: number = 1,
delta: number = 1,
[alias]
k = !gitk --all &
dismiss = reset HEAD --hard
rollback = reset --soft HEAD~1
unstage = reset HEAD --
undo = checkout --
redo = commit --amend --no-edit
sane = remote prune origin
send = push origin $(git rev-parse --abbrev-ref HEAD)
l = log --graph --pretty=format:'%C(yellow)%h%Creset %Cgreen%cr %C(bold blue)%an%Creset - %s%C(red)%d%Creset' --abbrev-commit --max-count=30
@brunobertolini
brunobertolini / vscode.keybindings.json
Last active February 27, 2021 13:34
vscode-terminal
// Empty
[
{
"key": "cmd+k cmd+o",
"command": "workbench.action.addRootFolder"
},
{
"key": "cmd+j",
"command": "workbench.action.toggleMaximizedPanel",
"when": "!terminalFocus"
SPACESHIP_PROMPT_ORDER=(
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
exec_time # Execution time
line_sep # Line break
vi_mode # Vi-mode indicator
jobs # Background jobs indicator
exit_code # Exit code section
{
"editor.suggestSelection": "first",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"github.copilot.enable": {
"yaml": false,
"*": true,
"plaintext": true,
"markdown": false
@brunobertolini
brunobertolini / safari-flex-gap-polyfill.css
Created December 8, 2021 14:30
A Flex Gap polyfill to old Safari versions using Tailwind
@supports (-webkit-touch-callout: none) {
.gap-2.flex:not(.flex-col):not(.flex-wrap) > *:not(:last-child) {
margin-right: 0.5rem;
}
.gap-3.flex:not(.flex-col):not(.flex-wrap) > *:not(:last-child) {
margin-right: 0.75rem;
}
.gap-4.flex:not(.flex-col):not(.flex-wrap) > *:not(:last-child) {
[
{
"gameTime": "2022-11-20T16:00:00Z",
"homeTeam": "cat",
"awayTeam": "equ"
},
{
"gameTime": "2022-11-21T13:00:00Z",
"homeTeam": "ing",
"awayTeam": "ira"