Skip to content

Instantly share code, notes, and snippets.

View richellyitalo's full-sized avatar
🏹
Exploring RemixJs

Richelly Italo richellyitalo

🏹
Exploring RemixJs
View GitHub Profile
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@richellyitalo
richellyitalo / bs-config.js
Created February 23, 2017 12:34
Browser sync to run with PHP Files
/*
|--------------------------------------------------------------------------
| Browser-sync config file
|--------------------------------------------------------------------------
|
| For up-to-date information about the options:
| http://www.browsersync.io/docs/options/
|
| There are more options than you see here, these are just the ones that are
@richellyitalo
richellyitalo / gist:6c1cc6b4258fad3c007e455b3534934c
Last active August 17, 2017 13:02
Subfolder para wordpress
######index.php######
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
@richellyitalo
richellyitalo / index.jsx
Created August 25, 2018 11:37 — forked from avinmathew/index.jsx
Multiple layouts with React Router v4
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
@richellyitalo
richellyitalo / get.js
Created August 27, 2018 15:59 — forked from rafaelstz/get.js
AJAX GET and POST with pure Javascript
// Exemplo de requisição GET
var ajax = new XMLHttpRequest();
// Seta tipo de requisição e URL com os parâmetros
ajax.open("GET", "minha-url-api.com/?name=Henry&lastname=Ford", true);
// Envia a requisição
ajax.send();
// Cria um evento para receber o retorno.
@richellyitalo
richellyitalo / spa-helper.js
Last active September 26, 2018 02:39
Spa auxiliar
// jquery on spa
// npm i -S jquery
window.$ = window.jQuery = require('jquery')
// sass on spa
// npm i -S bootstrap-sass
require('bootstrap-sass')
// import the sass file eg: src/assets/sass/app.sass
// file 'app.sass'
$icon-font-path: "node_modules/bootstrap-sass/assets/fonts/bootstrap/";
import React from 'react'
import classnames from 'classnames'
import PropTypes from 'prop-types'
const TextFieldGroup = ({
name,
placeholder,
value,
type,
label,
@richellyitalo
richellyitalo / PrivateRoute.js
Last active September 26, 2018 06:00
Rota privada utilizando redux.
import React, { Component } from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { Route, Redirect } from 'react-router-dom'
/*
* Como usar:
* <Switch>
* <PrivateRoute exact path="/comp" to={Comp} />
* </Switch>
@richellyitalo
richellyitalo / Login.js
Last active September 27, 2018 01:28
Recebendo props via redux e alterando o state do componente
// imports
class Login extends Component {
state = {
email: '',
password: '',
errors: {}
}
componentDidMount() {