Skip to content

Instantly share code, notes, and snippets.

View ajaybeniwal's full-sized avatar

Ajay Beniwal ajaybeniwal

View GitHub Profile
import './set-public-path';
import React from 'react';
import ReactDOM from 'react-dom';
import singleSpaReact from 'single-spa-react';
import Root from './root.component';
const lifecycles = singleSpaReact({
React,
ReactDOM,
rootComponent: Root,
/* eslint-disable no-undef */
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin').CleanWebpackPlugin;
module.exports = {
entry: path.resolve(process.cwd(), `src/test-spa.js`),
output: {
path: path.resolve(process.cwd(), 'dist'),
libraryTarget: 'system',
filename: 'bundle.js',
jsonpFunction: `webpackJsonp_smarthands`,
import 'package:flutter/material.dart';
import 'create_connection.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter App',
//
// FeatureViewController.swift
// IOS11AppStoreClone
//
// Created by Ajay Singh on 24/7/18.
// Copyright © 2018 Ajay Singh. All rights reserved.
//
import UIKit
class FeatureViewController: UIViewController,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout {
//
// TodayViewController.swift
// IOS11AppStoreClone
//
// Created by Ajay Singh on 26/10/17.
// Copyright © 2017 Ajay Singh. All rights reserved.
//
import UIKit
import 'package:flutter/material.dart';
class Bar extends StatelessWidget {
final double height;
final Color color;
const Bar({this.height,this.color}) : super();
@override
Widget build(BuildContext context) {
return Container(
width: 4.0,
import 'package:flutter/material.dart';
import 'barcontainer.dart';
import 'dart:async';
class BarContainerAnimation extends StatefulWidget {
@override
_BarContainerAnimationState createState() =>
new _BarContainerAnimationState();
}
import 'package:flutter/material.dart';
import 'bar.dart';
class BarContainer extends StatelessWidget {
BarContainer({Key key, this.controller}) : super(key: key);
final Animation<double> controller;
Animation<double> get stepOne =>
new Tween<double>(begin: 1.0, end: 1.5).animate(
new CurvedAnimation(
parent: controller,
@ajaybeniwal
ajaybeniwal / gist:e9a813f6c5082b0506c4
Created February 28, 2016 05:15
Sample Express App to handle apple wallet generation and updation
// This is sample gist to handle wallet updates and workflow of wallet
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
mongoose.connect('url');
var Schema = mongoose.Schema,
ObjectId = Schema.ObjectId;
import React,{Component} from 'react';
import { createRedux } from 'redux';
import Router from './router';
import { Provider } from 'redux/react';
import * as stores from './indexstore';
const redux = createRedux(stores);
export default class App extends Component {
constructor(props){
super(props);
this.state={Handler: null};