stop a fork bomb








Could not ssh to the VM, so try logging into it via web console, then see the message below:
bash fork retry: no child processes
It's cause by fork bomb.
To stop it,
killall -STOP -u user
killall -KILL -u user

see also




Typescript development setup with Visual Studio Code








  1. Install node.js
  2. Install node.js modules: typescript and tslint globally:
    npm install -g typescript tslint
  3. Install Visual Studio Code extensions: "TSLint" and "Debugger for Chrome"
    • Start Visual Studio Code
    • CMD+SHIFT+P (CTRL+SHIFT+P) then type: Extensions, select "Extensions: Install Extensions"
    • Search and install "Debugger for Chrome" and "TSLint" extensions
  4. Initialize project/workspace directory:
    mkdir HelloWorld
    cd HelloWorld
    tsc --init
    It will create tsconfig.json file in the project/workspace directory.
  5. open HelloWorld folder in Visual Studio Code, and edit tsconfig.json file:
    {
      "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "lib": [
            "es2015.promise", /* Promise */
            "dom"
        ],
        "sourceMap": true,
        "outDir": "./",
      }
    }
  6. Create index.html file:
    <!DOCTYPE html>
    <html>
    
    <head>
        <title>Hello Typescript</title>
    
    </head>
    
    <body>
        <h1>Fun with TypeScript</h1>
        <p id="index">Let's rock</p>
        <script src="main.js"> </script>
    </body>
    
    </html>
  7. Create main.ts file:
    function hello() {
        console.log('Hello');
        alert('hello');
    }
    hello();
  8. Configure Default Build Task
    • Open the command palette using CMD+SHIFT+P (CTRL+SHIFT+P) and type "Tasks", then select "Configure Default Build Task...", then select "tsc:watch".
    • It will create .vscode/tasks.json file.
    • tsc:watch runs automatically when you change a TypeScript file.)
  9. Run Build Task
    • CMD+SHIFT+B (CTRL+SHIFT+B) to build.
    • It generates main.js and main.js.map files.
  10. Debugging setup
    • CMD+SHIFT+P (CTRL+SHIFT+P) and select "Debuging: Start Debugging", then select "Chrome"
    • It should create .vscode/launch.json, edit the file:
      {
          "version": "0.2.0",
          "configurations": [
              {
                  "type": "chrome",
                  "request": "launch",
                  "name": "Launch Chrome against localhost",
                  "url": "http://localhost:8086/HelloWorld/index.html",
                  "webRoot": "${workspaceFolder}",
                  "userDataDir": "/tmp/chrome-debug",
              }
          ]
      }
    • Set some breakpoint in the main.ts, then CMD+SHIFT+P and "Debuging: Restart Debugging", see if it stops at the breakpoint.
  11. Directory structure:
    HelloWorld/
    HelloWorld/.vscode/
    HelloWorld/.vscode/launch.json
    HelloWorld/.vscode/settings.json
    HelloWorld/.vscode/tasks.json
    HelloWorld/index.html
    HelloWorld/main.ts
    HelloWorld/main.js
    HelloWorld/main.ts.map
    HelloWorld/tsconfig.json
    
    Project/Workspace settings are saved in .vscode/settings.json

See also




Mount smb share on Mac OS using mount-smbfs command








mount_smbfs "//DOMAIN;USERNAME:PASSWORD@smb-server.your.org/test" /Volumes/test