Skip to content

Instantly share code, notes, and snippets.

View lalitmee's full-sized avatar
👨‍💻
Unmarshalling

Lalit Kumar lalitmee

👨‍💻
Unmarshalling
View GitHub Profile
@lalitmee
lalitmee / ulauncher.md
Last active January 18, 2018 06:00
This is the log of ulauncher

❯ ulauncher -v

/usr/lib/python2.7/dist-packages/ulauncher/util/desktop/notification.py:1: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
  from gi.repository import Notify

 /usr/lib/python2.7/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py:6: PyGIWarning: WebKit2 was imported without specifying a version first. Use gi.require_version('WebKit2', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gio, Gtk, WebKit2, GLib
Ulauncher is already running
@lalitmee
lalitmee / webpack.config.js
Last active February 12, 2018 12:53
Web Pack configuration
/* eslint strict: 0 */
("use strict");
var path = require("path");
var webpack = require("webpack");
module.exports = {
entry: "./app/app.js",
output: { path: __dirname + "/public" + "/js", filename: "bundle.js" },
module: {
rules: [
@lalitmee
lalitmee / wepack.config.js
Created February 13, 2018 06:29
React - Module parse failed: You may need an appropriate loader to handle this file type.
/* eslint strict: 0 */
("use strict");
const path = require("path");
const webpack = require("webpack");
const webpackTargetElectronRenderer = require("webpack-target-electron-renderer");
let options = {
module: {
rules: [
@lalitmee
lalitmee / package.json
Created February 13, 2018 06:30
React - Module parse failed: You may need an appropriate loader to handle this file type.
{
"name": "scotch-player",
"productName": "Scotch Player",
"version": "1.0.0",
"description": "Scotch Demo Player",
"main": "main.js",
"scripts": {
"test": "npm test",
"start": "electron main.js",
"electron": "webpack && electron .",
@lalitmee
lalitmee / imagelist.js
Last active March 12, 2018 10:50
Reactjs and Laravel Server side rendering
// CreateItem.js
import React, { Component } from 'react';
import { Router, Link } from "react-router";
import {
Item,
Card,
Image,
Message,
Header,
import React from "react";
import { Route, IndexRoute } from "react-router-dom";
import App from "./app";
import "../../css/app.css";
import HomePage from "./components/pages/HomePage";
import MerchantsPage from "./components/pages/MerchantsPage";
import DealViewPage from "./components/pages/DealViewPage";
import DealDetailViewPage from "./components/pages/DealDetailViewPage";
import React from 'react';
import { HomePageHeader } from './components/Headers/HomePageHeader';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
import React from 'react';
import { render } from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import App from './app';
const el = document.getElementById('app');
render(
<BrowserRouter>
<App />
entry-client.js:3434 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `App`.
in App
in Router (created by BrowserRouter)
in BrowserRouter
entry-client.js:43358 Uncaught TypeError: Cannot read property 'props' of undefined
at App (entry-client.js:43358)
at mountIndeterminateComponent (entry-client.js:32256)
import React from 'react';
import { Segment, Menu, Icon } from 'semantic-ui-react';
import PropTypes from 'prop-types';
const HomePageHeader = ({ mobile }) => (
<Segment
style={{
minHeight: 30,
padding: '4px',
backgroundColor: '#6a5f9b',