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 lintjson
echo "\ncommon"
for file in libraries/epic-diesel-common/i18n/*.json
cat $file | jq empty
jsonlint-cli $file
echo "\nfeed"
for file in libraries/epic-diesel-feed/i18n/*.json
rafaelrinaldi / iOSVersion.js
Created Jun 27, 2013
Checks which iOS version is running.
View iOSVersion.js
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('.'));
rafaelrinaldi / index.html
Created Dec 21, 2015
iOS toggle indicator written in pure CSS. See it in action:
View index.html
<label class="toggle">
<input type="checkbox" class="toggle-phony"/>
<span class="toggle-indicator"></span>
View stations.json
"estacao-jabaquara": {
"lines": [
"location": {
"address": "Term. Jabaquara, São Paulo, Brazil",
"latitude": -23.647066,
"longitude": -46.63954
rafaelrinaldi /
Created Oct 20, 2010
Useful to get the real bounds of an object.
package rinaldi.display
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.geom.Rectangle;
* This method returns a Rectangle with the real visual DisplayObject bounds.
rafaelrinaldi / caret.scss
Created Nov 20, 2013
Pure CSS carets mixin.
View caret.scss
* Pure CSS carets mixin.
@mixin caret($size: 3px, $color: #ccc, $direction: "down") {
width: 0;
height: 0;
@if $direction == "down" {
rafaelrinaldi /
Last active Dec 24, 2018
`.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.


  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)
rafaelrinaldi /
Created Oct 8, 2012
Convert .psd files to .png files keeping the transparency.
#!/usr/bin/env bash
# Convert .psd files to .png files keeping the transparency.
# It uses `imagemagick` library.
# Usage:
# sh path/
# Author: Rafael Rinaldi (
View compose.js
const ButtonWithPadding = ({ children, ...props }) =>
<button style={{ padding: '15px 10px' }} {...props}>{children}</button>
const ButtonPrimary = ({ children, ...props }) =>
<button style={{ color: 'white', backgroundColor: 'seagreen' }} {...props}>{children}</button>
const ButtonOutline = ({ children, ...props}) =>
<button style={{ backgroundColor: 'transparent', border: '4px solid darkred' }} {...props}>{children}</button>
const ButtonBase = ({ children, ...props }) => <button {...props}>{children}</button>;
set -x LSCOLORS ExFxCxDxBxegedabagacad
set -x LC_CTYPE en_US.UTF-8
set -x EDITOR nvim
set -x VIMRC $HOME/.vimrc
set -x TMUXRC $HOME/.tmux.conf
set -x FISHRC $HOME/.config/fish/
# $PATH equivalent
set -U fish_user_paths /usr/local/bin
You can’t perform that action at this time.