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
@rafaelrinaldi
rafaelrinaldi / iOSVersion.js
Created Jun 27, 2013
Checks which iOS version is running.
View iOSVersion.js
// 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('.'));
@rafaelrinaldi
rafaelrinaldi / index.html
Created Dec 21, 2015
iOS toggle indicator written in pure CSS. See it in action: https://jsbin.com/harule
View index.html
<label class="toggle">
<input type="checkbox" class="toggle-phony"/>
<span class="toggle-indicator"></span>
</label>
View stations.json
{
"estacao-jabaquara": {
"lines": [
"linha-1-azul"
],
"location": {
"address": "Term. Jabaquara, São Paulo, Brazil",
"latitude": -23.647066,
"longitude": -46.63954
},
@rafaelrinaldi
rafaelrinaldi / getVisualBounds.as
Created Oct 20, 2010
Useful to get the real bounds of an object.
View getVisualBounds.as
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
rafaelrinaldi / caret.scss
Created Nov 20, 2013
Pure CSS carets mixin.
View caret.scss
/**
* Pure CSS carets mixin.
* http://css-tricks.com/snippets/css/css-triangle
*/
@mixin caret($size: 3px, $color: #ccc, $direction: "down") {
width: 0;
height: 0;
@if $direction == "down" {
@rafaelrinaldi
rafaelrinaldi / README.md
Last active Dec 24, 2018
`.mov` to `.gif` using QuickTime and Photoshop
View README.md

.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)
@rafaelrinaldi
rafaelrinaldi / to_png.sh
Created Oct 8, 2012
Convert .psd files to .png files keeping the transparency.
View to_png.sh
#!/usr/bin/env bash
#
# Convert .psd files to .png files keeping the transparency.
# It uses `imagemagick` library.
# Usage:
#
# sh to_png.sh path/
#
# Author: Rafael Rinaldi (rafaelrinaldi.com)
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>;
View config.fish
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/config.fish
# $PATH equivalent
set -U fish_user_paths /usr/local/bin
View test.md
Team
Name Role
Andre Carvalho Technology Director
Andy Baudoin Lead Developer
Bethany Pensworth Project Manager
Chris James Lead Developer
Jim Watkins QA Analyst
You can’t perform that action at this time.