分类 计算机知识库 下的文章

注意 ,这会直接更改 源文件:请自己谨慎运行:

替换阿里云的源为 ECS 源

sed -i 's/https:\/\/mirrors.aliyun.com/http:\/\/mirrors.cloud.aliyuncs.com/g' /etc/apt/sources.list

反向操作 -> 替换 ECS 源 为 阿里云公共源

sed -i 's/http:\/\/mirrors.cloud.aliyuncs.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list

文件下载地址:
任意一个都可以

您可以按以下步骤注册此带参命令为服务:

  1. 打开 PowerShell,以管理员身份运行。
  2. 运行以下命令来注册服务:

    `New-Service -Name Cloudflared -BinaryPathName "C:\路径\到\Cloudflared.exe proxy-dns --port 5553" -DisplayName "Cloudflared DNS Proxy" -Description "Cloudflare DNS over HTTPS Proxy"` 

    将 "C:路径到Cloudflared.exe" 替换为您的 Cloudflared 可执行文件的路径。

  3. 运行以下命令来启动服务:

    `Start-Service Cloudflared` 

    服务现在正在以带参形式运行,并且将在 Windows 启动时自动启动。

ref

  1. Press Windows Key + X on the keyboard and then select “Command Prompt (Admin)” from the menu.
  2. Stop the BITS, Cryptographic, MSI Installer and the Windows Update Services. To do this, type the following commands at a command prompt. Press the “ENTER” key after you type each command.
net stop wuauserv

net stop cryptSvc

net stop bits

net stop msiserver
  1. Now rename the SoftwareDistribution and Catroot2 folder. You can do this by typing the following commands in the Command Prompt. Press the “ENTER” key after you type each command.
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 Catroot2.old
  1. Now, let’s restart the BITS, Cryptographic, MSI Installer and the Windows Update Services. Typethe following commands in the Command Prompt for this. Press the ENTER key after you type each command.
net start wuauserv

net start cryptSvc

net start bits

net start msiserver
  1. Type Exit in the Command Prompt to close it and then restart the computer.

{
  // Same API as `v-bind:class`, accepting either
  // a string, object, or array of strings and objects.
  class: {
    foo: true,
    bar: false
  },
  // Same API as `v-bind:style`, accepting either
  // a string, object, or array of objects.
  style: {
    color: 'red',
    fontSize: '14px'
  },
  // Normal HTML attributes
  attrs: {
    id: 'foo'
  },
  // Component props
  props: {
    myProp: 'bar'
  },
  // DOM properties
  domProps: {
    innerHTML: 'baz'
  },
  // Event handlers are nested under `on`, though
  // modifiers such as in `v-on:keyup.enter` are not
  // supported. You'll have to manually check the
  // keyCode in the handler instead.
  on: {
    click: this.clickHandler
  },
  // For components only. Allows you to listen to
  // native events, rather than events emitted from
  // the component using `vm.$emit`.
  nativeOn: {
    click: this.nativeClickHandler
  },
  // Custom directives. Note that the `binding`'s
  // `oldValue` cannot be set, as Vue keeps track
  // of it for you.
  directives: [
    {
      name: 'my-custom-directive',
      value: '2',
      expression: '1 + 1',
      arg: 'foo',
      modifiers: {
        bar: true
      }
    }
  ],
  // Scoped slots in the form of
  // { name: props => VNode | Array<VNode> }
  scopedSlots: {
    default: props => createElement('span', props.text)
  },
  // The name of the slot, if this component is the
  // child of another component
  slot: 'name-of-slot',
  // Other special top-level properties
  key: 'myKey',
  ref: 'myRef',
  // If you are applying the same ref name to multiple
  // elements in the render function. This will make `$refs.myRef` become an
  // array
  refInFor: true
}

更新 2023年3月23日

测试了 v16.13.2 也是可以的
最新版的 LTS v18.15.0 是支持的

作废

The Array.at(index) method was introduced with ECMAScript 2019 (ES10). Therefore, the minimum version of Node.js that supports this method is Node.js v12.4.0. Any version of Node.js that is equal to, or greater than, v12.4.0 will include support for the Array.at() method.

There are several npm packages available for obfuscating Node.js and Express source code. Here are some popular ones:

  1. JavaScript obfuscator - This npm package can obfuscate JavaScript code including Node.js and Express source code. You can customize the settings to change the degree of obfuscation.
  2. UglifyJS - This package can minify and obfuscate JavaScript code, including Node.js and Express source code. It also supports source maps, which makes it easier to debug your code.
  3. Obfuscator - This is another popular npm package for obfuscating JavaScript code, including Node.js and Express source code. It offers options to customize the obfuscation process.
  4. Jscrambler - This is a commercial tool that can obfuscate and protect your Node.js and Express source code. It offers a wide range of features, including code obfuscation, control flow flattening, function and variable renaming, code locks, white-box cryptography, and much more.

It's worth noting that while obfuscation can make it harder for someone to understand your code, it's not a foolproof way to protect your intellectual property. If you want to ensure the full security of your Node.js and Express source code, you may want to consider other security measures such as encryption, access control, and monitoring/logging.