Skip to content

Instantly share code, notes, and snippets.

View rodolfopeixoto's full-sized avatar
🏠
Working from home

Rodolfo Peixoto rodolfopeixoto

🏠
Working from home
View GitHub Profile
# bad
d = yyyymmdstr = Time.now.strftime('%Y/%m/%d')
# good
current_date = Time.now.strftime('%Y/%m/%d')
namespace :add_pure_pilates_in_brazil do
desc "Add gyms pure pilates"
task start: :environment do
@brazil = Country.brazil
path = Rails.root.join('lib', 'tasks', 'data', 'pure_pilates_sp_dados.csv')
csv_text = File.read(path)
csv = CSV.parse(csv_text, headers: true, col_sep: ';', encoding: 'utf-8')
gym_group = GymGroup.find_or_create_by(name: 'Pure Pilates', country: @brazil)
pilates = Modality.find_by(name: 'pilates')
import React, { Component } from 'react';
import {
View,
Text,
TouchableOpacity,
Image,
YellowBox
} from 'react-native';
import { STYLES } from './style';
import { CAMERA_ICON } from './../../config/images';
import React from 'react';
import { Text, View, TouchableOpacity, VibrationVibration, Dimensions } from 'react-native';
import { Camera, Permissions, FileSystem } from 'expo';
import { Ionicons, Entypo } from '@expo/vector-icons';
const { width, height } = Dimensions.get('window');
export default class CameraScreen extends React.Component {
state = {
module DeviseHelper
def resource_name
:usuario
end
def resource
@resource ||= Usuario.new
end
<!--Modal box-->
<div class="modal fade" id="login" role="dialog">
<div class="modal-dialog modal-sm">
<!-- Modal content no 1-->
<div class="modal-content">
<div class="modal-header">
import React, { Component } from 'react';
import * as routes from '../constants/routes';
import { Link } from 'react-router-dom';
import { auth, db } from './../firebase';
import { Map, InfoWindow, Marker, GoogleApiWrapper } from 'google-maps-react';
import '../stylesheets/Map.css';
import 'font-awesome/css/font-awesome.min.css';
import { ucs2 } from 'punycode';
import React, { Component } from 'react';
import * as routes from '../constants/routes';
import { geolocated } from 'react-geolocated';
import { Link } from 'react-router-dom';
import { db } from './../firebase';
const INITIAL_STATE = {
email: '',
city: 'camposDosGoytacazes',
latitude: null,
import React, { Component } from 'react';
import * as routes from '../constants/routes';
import { geolocated } from 'react-geolocated';
import { Link } from 'react-router-dom';
import { db } from './../firebase';
const INITIAL_STATE = {
email: '',
city: 'camposDosGoytacazes',
latitude: null,
import React, { Component } from 'react';
import * as routes from '../constants/routes';
import { geolocated } from 'react-geolocated';
import { Link } from 'react-router-dom';
import { db } from './../firebase';
const INITIAL_STATE = {
email: '',
city: 'camposDosGoytacazes',
latitude: null,