Skip to content

Instantly share code, notes, and snippets.

gl () {
echo '-----------------------------------------------------------';
if [[ $# = 0 ]]; then
git log --graph --decorate --oneline --all --max-count 25;
else
git log --graph --decorate --oneline --all --max-count $1;
fi
}
import React from 'react'
export default class Map extends React.Component {
componentDidMount() {
// console.log('componentDidMount');
initGoogleMap(this.refs.map)
}
render() {
return (
<div>
//parent.js
export default class Parent extends React.Component {
childClicked = (data) => {
console.log('data from child:', data)
}
render() {
return <Child onClick={this.childClicked} } />
}
}
//parent.js
export default class Parent extends React.Component {
render() {
var somePropFromStore = this.prop.somePropFromStore
return <Child />
}
}
//child.js
import React from 'react';
import { Component } from 'react';
import {connect} from 'react-redux';
import Table from './Table';
import TableColumns from './TableColumns';
import TableRows from './TableRows';
class TableContainer extends Component{
render(){
/*jshint camelcase: false */
define(['jquery', 'text!templates/spacingbox.html', 'underscore', 'backbone', 'moment', 'text!templates/spinbox.html', 'views/margin-view.js', 'views/padding-view.js', 'models/spacingbox-model', 'fusion-fuel'],
function ($, template, _, backbone, moment, spinboxTemplate, MarginView, PaddingView, SpacingBoxModel) {
void(backbone); // REMOVE - helps prevent "object not used" jslint errors until the object is used in code
void(moment); // REMOVE - helps prevent "object not used" jslint errors until the object is used in code
/**
@element Spacingbox
@description The margin and padding styling control.
@hai5nguy
hai5nguy / yo.js
Last active February 6, 2017 21:52
class Navigation extends React.Component {
constructor() {
super();
this.state = {
active: 'home',
};
}
changeNavigation = (e, section) => {
e.preventDefault();
shopt -s extglob
alias ll='ls -la'
alias redis='cd ~; redis-server /usr/local/etc/redis.conf'
alias ll_bower='ls -la bower_components'
# gits!
alias gfa="git fetch --all; gs"
# alias grh='git reset --hard; gl 10; gs'
import { dispatch } from '~/store/store'
import PadawanApi from '~/actions/padawan-api'
const create = async (student) => {
dispatch({
type: 'CREATE_STUDENT_START',
student
})