This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from "react"; | |
| import PizZip from "pizzip"; | |
| import { DOMParser } from "@xmldom/xmldom"; | |
| function str2xml(str) { | |
| if (str.charCodeAt(0) === 65279) { | |
| // BOM sequence | |
| str = str.substr(1); | |
| } | |
| return new DOMParser().parseFromString(str, "text/xml"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import JsPDF from "jspdf"; | |
| import html2canvas from "html2canvas"; | |
| const htmlStringToPdf = async (htmlString) => { | |
| let iframe = document.createElement("iframe"); | |
| iframe.style.visibility = "hidden"; | |
| document.body.appendChild(iframe); | |
| let iframedoc = iframe.contentDocument || iframe.contentWindow.document; | |
| iframedoc.body.innerHTML = htmlString; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import csv from 'csv'; | |
| function CsvParser() { | |
| const [headers, setHeaders] = useState([]); | |
| const [csvData, setCsvData] = useState([]); | |
| const onFileUpload = (event) => { | |
| const fileReader = new FileReader(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const envChange = () => { | |
| let env = process.argv.slice(2)[0].split("=")[1]; | |
| if (env === "dev" || env === "testing" || env === "production") { | |
| fs.readFile(`./env/${env}.json`, 'utf8', (err, data) => { | |
| if (err) { | |
| throw err; | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useState} from 'react'; | |
| import Compressor from 'compressorjs'; | |
| const Upload = () => { | |
| const [compressedFile, setCompressedFile] = useState(null); | |
| const handleCompressedUpload = (e) => { | |
| const image = e.target.files[0]; | |
| new Compressor(image, { | |
| quality: 0.8, // 0.6 can also be used, but its not recommended to go below. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # https://www.nginx.com/resources/wiki/start/ | |
| # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ | |
| # https://wiki.debian.org/Nginx/DirectoryStructure | |
| # | |
| # In most cases, administrators will remove this file from sites-enabled/ and | |
| # leave it as reference inside of sites-available where it will continue to be | |
| # updated by the nginx packaging team. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Button, Icon, Modal, Popover, Upload } from "antd"; | |
| import React from "react"; | |
| import ReactImageCrop from "react-image-crop"; | |
| import "react-image-crop/dist/ReactCrop.css"; | |
| class ImageUploadCrop extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| loading: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mport React from "react"; | |
| import ReactJWPlayer from "react-jw-player"; | |
| import './index.css'; | |
| class JwPlayer extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| is_liked: false, | |
| }; |
NewerOlder