Skip to content

Instantly share code, notes, and snippets.

Rafael R rafaelrinaldi

Block or report user

Report or block rafaelrinaldi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Column.js
import React from 'react';
import PropTypes from 'prop-types';
import { Box } from 'reflexbox';
const Column = ({ children, size, ...props }) => (
<Box w={size} {...props}>


Quick guide on how to make use of the project's grid system


View typography.js
const calc = (minWidth, maxWidth, minFontSize, maxFontSize) =>
`calc(${minFontSize}px + (${maxFontSize} - ${minFontSize}) * ((100vw - ${minWidth}px) / (${maxWidth} - ${minWidth})))`;
const fluidType = (minWidth, maxWidth, minFontSize, maxFontSize) => ({
fontSize: minFontSize,
[`@media screen and (min-width: ${minWidth}px)`]: {
fontSize: calc(minWidth, maxWidth, minFontSize, maxFontSize),
[`@media screen and (min-width: ${maxWidth}px)`]: {
View parse-int.clj
(defmulti parse-int (fn [x] (class x)))
(defmethod parse-int String [x]
(try (Integer/parseInt x) (catch RuntimeException re 0)))
(defmethod parse-int nil [_] 0)
(defmethod parse-int Number [x] x)
View utils.clj
(ns api-fetchers.utils
(:require [clj-time.format :as format-time]
[taoensso.timbre :as timbre :refer [info]])
(:import java.text.SimpleDateFormat
[java.time Duration Instant]
(defn unzip
"Returns a `ZipInputStream` with the contents of `input-stream`"
View bold.clj
(defn bold [x]
(let [keys (seq "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ")
values ["\uD835\uDDD4"
View utils.clj
(defn str->num [x]
(-> (NumberFormat/getInstance (Locale/forLanguageTag "en-US")) (.parse x)))
(defn numeric? [x]
(str->num x)
(catch ParseException pe false)))
(defn vector-of-vectors? [x]
(every? vector? x))
View units.clj
(ns private.tmp.units)
(defn- ounces->kg
(let [lb 16 ;; 1kg → 16lb
oz 2.2] ;; 1kg → 2.2oz
(->> (/ input lb oz) (format "%.3f kg"))))
View index.css
.toggle {
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
justify-content: left;
.toggle-phony {
opacity: 0;
rafaelrinaldi / core.clj
Created Jul 7, 2017
Upload a JSON file to an S3 bucket
View core.clj
(ns facebook-campaigns-resolver.core
(:require [cheshire.core :as json]
[clj-http.client :as http]
[ :as s3]
[ :as s3transfer]
[ :as io]))
(def ^:private url "")
(def ^:private aws {:key ""
You can’t perform that action at this time.