This file contains 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 { useState } from "react"; | |
import logo from "./logo.svg"; | |
import "./App.css"; | |
function App() { | |
return ( | |
<div className="App"> | |
<div | |
style={{ | |
// width: "200px", |
This file contains 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 techstackItems = [ | |
"JavaScript", | |
"TypeScript", | |
"Nodejs", | |
"Nextjs", | |
"Wordpress", | |
"React", | |
"ES6+", | |
"Angular", | |
"Angularjs", |
This file contains 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
// jscodeshift can take a parser, like "babel", "babylon", "flow", "ts", or "tsx" | |
// Read more: https://github.com/facebook/jscodeshift#parser | |
export const parser = "tsx"; | |
const allStyleProps = ["bg", "margin", "lineHeight", "padding", "fontWeight"]; | |
export default function transformer(file, api) { | |
const j = api.jscodeshift; | |
const root = j(file.source); |
This file contains 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 sourceCodeDir = "./pages"; | |
const fs = require("fs"); | |
const path = require("path"); | |
const getAllFiles = function (dirPath, arrayOfFiles) { | |
files = fs.readdirSync(dirPath); | |
arrayOfFiles = arrayOfFiles || []; | |
files.forEach(function (file) { |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmLBr+Ua1zhmtOGOmiZUPzW92+IE/j4gtn6ifRx+SNOR1iJIE/9e44hKmW2p/BVvhXynUJOy9xMgOdlRu3y1WUnB+wDRngxYe9GY1kTBYF0IRJCTM+laumOKmjlUPakEUpD2VLBx3o6ygqmV2GhsDZq8vbwdRNbVGfTEXIZpMKtTYJ/MenOhNZtvtVISCrPMXT7CLoGa53mBniIjswo2B6vBxafVfZjb6iRRbhJTf/hUAZc6eycbKjjMa9xjuz+c3QoD+aTmIGXKI/XaZOKukz4dhC+g7CIEHsGFWFTiZzzhkmvyG2HcqGRHQ2rGN6Z0hskQOxrNMiGUnbOpsZgb0P vamshi@vamshi-linux |
This file contains 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 input_array = [[1,2,[3]],4] | |
function flatten(arr) { | |
return arr.reduce(function (flat, toFlatten) { | |
return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten); | |
}, []); | |
} | |
flatten(input_array) |