Skip to content

Instantly share code, notes, and snippets.

View intelliapps-io's full-sized avatar

Intelliapps intelliapps-io

View GitHub Profile
@intelliapps-io
intelliapps-io / Common.webpack.jk
Created August 1, 2018 01:53
Webpack 4 compression optimizations
const devMode = process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "development_prod";
const path = require("path");
const glob = require("glob-all");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const CompressionPlugin = require("compression-webpack-plugin");
const PurgecssPlugin = require("purgecss-webpack-plugin");
const OptimizeCssAssetsPlugin = require("optimize-css-assets-webpack-plugin");
// const OfflinePlugin = require('offline-plugin');
import React, { Component } from "react";
import { compose, graphql } from "react-apollo";
import { withRouter, Link } from "react-router-dom";
import _forOwn from "lodash/forOwn";
import { Row, Col, Form, Button } from "antd";
const FormItem = Form.Item;
import "./eventForm.scss";
import FormItems, { formItemLayout } from "./FormItems";
@intelliapps-io
intelliapps-io / snippits.json
Created January 19, 2019 19:37
VS Code React Snippet
{
"TypeScript React Component Full": {
"prefix": "tsrcf",
"body": [
"import * as React from \"react\";",
"",
"interface IProps {",
"",
"}",
"",
@intelliapps-io
intelliapps-io / simop
Created June 27, 2019 01:05
Useflit Snupp
{
// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
import React, { useState } from 'react';
import './App.css';
export function useForm<FormFields>(initalValues: FormFields): [FormFields, (event: React.ChangeEvent<any>) => void] {
const [values, setValues] = useState<FormFields>(initalValues);
return [
values,
event => {
setValues({
@intelliapps-io
intelliapps-io / useForm.tsx
Created August 31, 2019 23:48
React Hook for Forms
import { useState } from "react";
export interface UseFormMethods<FormFields> {
setFieldValue: (key: keyof FormFields, value: any) => void;
setFieldsValue: (values: FormFields) => void;
getFieldValue: (key: keyof FormFields) => any;
fieldsValue: FormFields;
clearForm: () => void
}
@intelliapps-io
intelliapps-io / useForm.tsx
Created August 31, 2019 23:48
React Hook for Forms
import { useState } from "react";
export interface UseFormMethods<FormFields> {
setFieldValue: (key: keyof FormFields, value: any) => void;
setFieldsValue: (values: FormFields) => void;
getFieldValue: (key: keyof FormFields) => any;
fieldsValue: FormFields;
clearForm: () => void
}
import java.util.*;
//Define the class decryption.
public class decryption
{
//Define the main() method.
@intelliapps-io
intelliapps-io / ddclient.conf
Created January 17, 2020 04:05
Namecheap Dynamic DNS ddclient config
### START - DO NOT EDIT ###
daemon=600
ssl=yes
use=web
web=dynamicdns.park-your-domain.com/getip
protocol=namecheap
server=dynamicdns.park-your-domain.com
wildcard=yes
protocol=namecheap
### END - DO NOT EDIT ###
@intelliapps-io
intelliapps-io / rentalandsupply.css
Created July 9, 2020 20:49
Reasonable Rentals Custom CSS
#sidebar {
min-width: 250px;
max-width: 250px;
}