sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| function stripProperty(obj, prop) { | |
| const newObj = Object.keys(obj).filter(el => el !== prop) | |
| const values = newObj.map(el => [el, obj[el]]) | |
| return Object.fromEntries(values) | |
| } |
| /* eslint-disable react-hooks/exhaustive-deps */ | |
| import { useEffect, useState } from "react"; | |
| import axios, { Method } from "axios"; | |
| /** | |
| * https://github.com/ali-master/react-typescript-hooks-sample | |
| */ | |
| const useFetch = ( | |
| url: string, | |
| method: Method, |
| /* Add the subtle gradient to the editor background */ | |
| .monaco-editor { | |
| background-color: transparent !important; | |
| background-image: linear-gradient(to bottom, #2a2139 75%, #34294f); | |
| background-size: auto 100vh; | |
| background-position: top; | |
| background-repeat: no-repeat; | |
| } | |
| .monaco-workbench { |
| ... | |
| "architect": { | |
| "build": { | |
| "builder": "@angular-builders/custom-webpack:browser", | |
| "options": { | |
| "customWebpackConfig": { | |
| "path": "./extend.webpack.config.js" | |
| }, | |
| ... |
| SPACESHIP_ANGULAR_SHOW="${SPACESHIP_ANGULAR_SHOW:=true}" | |
| SPACESHIP_ANGULAR_PREFIX="${SPACESHIP_ANGULAR_PREFIX:="and "}" | |
| SPACESHIP_ANGULAR_SUFFIX="${SPACESHIP_ANGULAR_SUFFIX:="$SPACESHIP_PROMPT_DEFAULT_SUFFIX"}" | |
| SPACESHIP_ANGULAR_SYMBOL="${SPACESHIP_ANGULAR_SYMBOL:="🅰️ "}" | |
| SPACESHIP_ANGULAR_DEFAULT_VERSION="${SPACESHIP_ANGULAR_DEFAULT_VERSION:=""}" | |
| SPACESHIP_ANGULAR_COLOR="${SPACESHIP_ANGULAR_COLOR:="red"}" | |
| _is_angular_project() { | |
| node -p "r=require('./package.json'); r.devDependencies['$1'] || r.dependencies['$1']" 2>/dev/null | |
| } |
| /** | |
| * Take an array of objects of similar structure and convert it to a CSV. | |
| * @source https://halistechnology.com/2015/05/28/use-javascript-to-export-your-data-as-csv/ | |
| * @modifiedBy sators | |
| * @param {Array} options.data Array of data | |
| * @param {String} options.columnDelimiter Column separator, defaults to "," | |
| * @param {String} options.lineDelimiter Line break, defaults to "\n" | |
| * @return {String} CSV | |
| */ | |
| export default ({data = null, columnDelimiter = ",", lineDelimiter = "\n"}) => { |
| <ion-input type="tel" pattern="\d*" placeholder="(xxx) xxx-xxxx" mask="(***) ***-****" [(ngModel)]="phone" name="phone"></ion-input> | |
| <ion-input type="tel" pattern="\d*" placeholder="xxx-xx-xxxx" mask="***-**-****" [(ngModel)]="ssn" name="ssn"></ion-input> |
| import * as React from "react"; | |
| import * as PropTypes from "prop-types"; | |
| interface IExampleComponentProps { | |
| text?: string; | |
| onCounterIncrease: (count: number) => void; | |
| } | |
| interface IExampleComponentState { | |
| clicks: number; |