Skip to content

Instantly share code, notes, and snippets.


Rastislav Lamos lamosty

View GitHub Profile
lamosty /
Last active Oct 20, 2018
How to code in Vim — Commands, a video tutorial on Youtube:

Command (normal) mode:


  • :w - save file
  • :q - close file
  • :q! - close file without saving
  • :x - save and close


  • h - left
View AboutPage.js
import React, { Component } from 'react';
// Dumb component
export default class AboutPage extends Component {
createMarkup(html) {
return {
__html: html
View MainNavigation.js
import React, { Component } from 'react';
import { Link } from 'react-router';
export default class MainNavigation extends Component {
render() {
return (
<div className="blog-masthead">
<div className="container">
<nav className="nav blog-nav">
<Link to="/" className="nav-link" activeClassName="active" onlyActiveOnIndex={true}>Home</Link>
View Header.js
import React, { Component } from 'react';
export default class Header extends Component {
render() {
return (
<div className="blog-header">
<div className="container">
<h1 className="blog-title">The Bootstrap Blog</h1>
<p className="lead blog-description">An example blog template built with Bootstrap.</p>
lamosty / index.js
Created Nov 9, 2015
Main file for the Lexi WP theme, from the tutorial about React WP theme:
View index.js
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import { Provider } from 'react-redux';
import { Router, Route, IndexRoute } from 'react-router';
import configureStore from './store/configureStore';
import LexiTheme from './containers/LexiTheme';
import ArticlePage from './containers/ArticlePage';
import ArticleListingPage from './containers/ArticleListingPage';
import AboutPageContainer from './containers/AboutPageContainer';
lamosty / index.template.html
Created Nov 9, 2015
Template file for the HTML Webpack Plugin. From the tutorial about React WP Theme:
View index.template.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<div id="root"></div>
View server.js
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
stats: {
colors: true
View webpack.config.js
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: [
lamosty / packages.json
Last active Oct 26, 2015
package.json file from the Lexi WordPress theme:
View packages.json
"name": "Lexi-WP-Theme",
"version": "0.0.1",
"description": "",
"license": "MIT",
"dependencies": {
"history": "^1.9.0",
"isomorphic-fetch": "^2.1.1",
"react": "^0.14.0-rc1",