Directly from CLI
alias x='exit'
funcsave x
or create a file in
~/.config/fish/functions
with name
| #!/usr/bin/env zsh | |
| # | |
| # This script generates and writes to file another bash-script (output_script) | |
| # that implements "vscodeInstallExtensions" function which installs all | |
| # Visual Studio Code extensions that were originally installed on your machine | |
| # at the moment of generation output_script by running | |
| # "vscodeUpdateExtensionsInstallationScript" function that is implemented here below. | |
| # | |
| # # How to use | |
| # |
| { | |
| "recommendations": [ | |
| "aaron-bond.better-comments", | |
| "adpyke.codesnap", | |
| "adrianwilczynski.alpine-js-intellisense", | |
| "ahinkle.laravel-model-snippets", | |
| "ahmadawais.shades-of-purple", | |
| "aibnuhibban.laravel-smart-command", | |
| "alefragnani.project-manager", | |
| "amiralizadeh9480.laravel-extra-intellisense", |
Directly from CLI
alias x='exit'
funcsave x
or create a file in
~/.config/fish/functions
with name
| #Option 1 | |
| set -U fish_user_paths /usr/local/bin $fish_user_paths | |
| #option 2 | |
| set PATH $PATH /usr/local/bin | |
| export PATH | |
| function ll | |
| ls -lh $argv | |
| end |
| function getSupervisorName(enteredId: string | null) { | |
| let employee, supervisor; | |
| if (null != enteredId && | |
| null != (employee = repository.findById(parseInt(enteredId))) && | |
| null != employee.supervisorId && | |
| null != (supervisor = repository.findById(employee.supervisorId))) | |
| return supervisor.name; | |
| } |
| function getSupervisorName(enteredId: string | null) { | |
| let employee, supervisor; | |
| if (null != enteredId && | |
| null != (employee = repository.findById(parseInt(enteredId))) && | |
| null != employee.supervisorId && | |
| null != (supervisor = repository.findById(employee.supervisorId))) | |
| return supervisor.name; | |
| } |
| let data: Record<string, any> = { initial: "something" } | |
| let key = "root.field.subField" | |
| const setNestedValue = (obj: Record<string, any>, path: string, value) => { | |
| return path.split(".") | |
| .reduce((acc, cur, index, arr) => index === arr.length - 1 ? acc[cur] = value : acc[cur] = {}, obj) | |
| } | |
| const getNestedValue = (obj: Record<string, any>, path: string, defaultValue?: any) => |
| interface IForm { | |
| id: string | |
| sections: any[] | |
| classNames?: string | |
| store?: any | |
| validator?: any | |
| } | |
| export type FieldType = "text" | "email" | "password" | "tel" | "date" | "time" | "number" | |
| <script> | |
| import FormBuilder from './FormBuilder.svelte' | |
| import { Form } from './Form' | |
| let form = new Form({id: "Test Form", sections: []}) | |
| let title ="New Section" | |
| function addSection(){ | |
| form= form.addSection({title: title, rows:[]}); | |
| form.print() | |
| } |