This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Component extends React.Component { | |
componentWillMount() { | |
warning( | |
!(this.props.component && this.props.render), | |
"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored" | |
); | |
warning( | |
!( | |
this.props.component && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Item = ( { item, handleItemClick, getItemClassName } ) => | |
<div | |
key={item.id} | |
className={getItemClassName(item)} | |
onClick={handleItemClick(item)} | |
> | |
<div className="main">{item.lastName}, {item.firstName}</div> | |
<div className="secondary"> | |
{item.company} | |
<span className="meta"> (hired: {item.hireDate})</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Delete the current file and close the buffer | |
function! DeleteFileAndCloseBuffer() | |
let b:choice = confirm("Delete file and close buffer?", "&Yes\n&No",1) | |
if b:choice == 1 | |
call delete(expand('%:p')) | bdelete! | |
endif | |
endfunction | |
" Map to ;rm | |
nnoremap <silent> <leader>rm :call DeleteFileAndCloseBuffer()<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! AddPathToName(name) | |
let b:path = expand('%:p:h') | |
let b:filename = join([b:path, a:name],'/') | |
execute "vnew ". b:filename | |
endfunction | |
"named vnew | |
command! -nargs=1 VN call AddPathToName(<f-args>) | |
function! MoveSelectionToBuffer(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const flatten = list => list.reduce( | |
(a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), [] | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"flight_type":"domestic", | |
"num_passengers":1, | |
"pickup_datetime":null, | |
"flight_datetime":"2017-04-12T08:30:00-07:00", | |
"search_id":"703ea611fe4d420e831b3a5aa0ac598a", | |
"results":[ | |
{ | |
"result_id":"1b074ec7117f4291aa2278fecd057a88", | |
"total_price":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"flight_type":"domestic", | |
"num_passengers":1, | |
"pickup_datetime":null, | |
"flight_datetime":"2017-04-12T08:30:00-07:00", | |
"search_id":"6d0da58c3afd4f59b1c71d353cdfa163", | |
"results":[ | |
{ | |
"result_id":"1b074ec7117f4291aa2278fecd057a88", | |
"total_price":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Components.Products.Model exposing (..) | |
type alias Product = | |
{id : Int | |
,image: String | |
,title: String | |
,description: String | |
,price: Int | |
,quality: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Model exposing (..) | |
import Routing | |
import Components.Productos.Model as Products | |
type alias Model = | |
{ route: Routing.Route | |
, products: Products.Model | |
} |