I use UCI together with bash. In case of other shells the variable and loop syntax might have to be adjusted accordingly.
-
Reference the newly added item with
[-1]:uci add firewall rule uci set firewall.@rule[-1].name=test
| // TSF*** | |
| type IncrementPointer = '>' | |
| type DecrementPointer = '<' | |
| type IncrementByte = '+' | |
| type DecrementByte = '-' | |
| type Output = '.' | |
| type Input = ',' | |
| type LoopOpen = '[' | |
| type LoopClose = ']' |
| import type { AxiosRequestConfig } from "axios"; | |
| import axios from "axios"; | |
| import qs from "qs"; | |
| export const createHttpClient = (config?: AxiosRequestConfig) => { | |
| return axios.create({ | |
| paramsSerializer: (params) => qs.stringify(params, { skipNulls: true }), | |
| ...config, |
| #!/bin/bash | |
| readonly VERSION='1.0' | |
| readonly BLUE="\e[34m" | |
| readonly NC="\e[0m" | |
| readonly FQDN=$(hostname -f) | |
| version() { | |
| echo "$VERSION" | |
| } |
| import { spawn } from 'node:child-process' | |
| // --usergroup=$VPN_GROUP | |
| // --certificate=${certificate} --key-password=$CERT_PASSPHRASE | |
| // "passwd-on-stdin" | |
| echo ${password} | openconnect ${server} --user=${user} --passwd-on-stdin |
| $computername = "hostname" | |
| Invoke-Command -ComputerName $computername -ScriptBlock { | |
| $computer = $env:COMPUTERNAME | |
| $domain = "domain" | |
| $user = "username" | |
| $group = [ADSI]"WinNT://$computer/Remote Desktop Users,group" | |
| $group.psbase.Invoke("add",([ADSI]"WinNT://$domain/$user").Path) | |
| } |
| #!/bin/bash | |
| # | |
| # This script creates a new user on the local system. | |
| # You will be prompt to enter the username, the person name, and a password | |
| # The username, password and host for the account will be displayed. | |
| # Make sure the script is being executed with superuser privileges. | |
| if [[ "${UID}" -ne 0 ]] | |
| then | |
| echo 'Please run with sudo or as root.' |
| /* eslint-disable @typescript-eslint/no-non-null-assertion */ | |
| import axios, { AxiosError, AxiosRequestConfig } from 'axios'; | |
| import React from 'react'; | |
| export interface AxiosHooks<T> { | |
| response: T | null; | |
| loading: boolean; | |
| error: AxiosError | null; | |
| abortController: AbortController | null; | |
| executeFetch: () => Promise<void>; |
| Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco install chocolatey -y | |
| choco install git.install -y | |
| choco install git-credential-manager-for-windows -y | |
| choco install github -y | |
| choco install gh -y | |
| #@choco install git-fork -y |