cd $Env:USERPROFILE;
Invoke-WebRequest https://raw.githubusercontent.com/jchip/nvm/v1.5.4/install.ps1 -OutFile install.ps1;
.\install.ps1 -nvmhome $Env:USERPROFILE\nvm;
del install.ps1
To install a font in WSL, follow these steps:
-
Check Font Location: Confirm that the font file (e.g., VictorMono.ttf) is located in a directory accessible from your WSL instance. You can copy the font file to your WSL home directory for simplicity.
-
Install Font: You can use the
fc-cache
command to update the font cache in WSL and make the font available. Open a terminal in your WSL instance and run the following commands:
sudo cp /mnt/c/path/to/VictorMono.ttf /usr/local/share/fonts/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Copyright (C): 2017 Pat Migliaccio | |
:: pat@patmigliaccio.com | |
:: | |
:: LICENSE: MIT | |
:: | |
:: File: install-git.bat | |
:: | |
:: Batch file for a quick install of Git for Windows | |
:: Include the git*.exe install executable | |
:: in the same directory as this script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
NET SESSION >nul 2>&1 | |
IF %ERRORLEVEL% NEQ 0 ( | |
echo This setup needs admin permissions. Please run this file as admin. | |
pause | |
exit | |
) | |
set NODE_VER=null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { readFileSync } from 'fs'; | |
import { builtinModules } from 'module'; | |
import ts from 'typescript'; | |
const tsHost = ts.createCompilerHost( | |
{ | |
allowJs: true, | |
noEmit: true, | |
isolatedModules: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function memorySizeOf(obj) { | |
var bytes = 0; | |
function sizeOf(obj) { | |
if(obj !== null && obj !== undefined) { | |
switch(typeof obj) { | |
case 'number': | |
bytes += 8; | |
break; | |
case 'string': |
- Fork and clone https://github.com/Sunbird-Ed/SunbirdEd-portal
- Install dependencies
src/desktop && yarn install
- Install dependencies
cd OpenRAP && yarn install
- Generate build under
cd src/desktop/OpenRAP && npm run pack
- Copy generated .tgz file path; ex:
/home/User1/SunbirdEd-portal/src/desktop/OpenRAP/dist/project-sunbird-OpenRAP-1.0.2.tgz
- cd ..
- yarn add path-to-tar file
yarn add /home/User1/SunbirdEd-portal/src/desktop/OpenRAP/dist/project-sunbird-OpenRAP-1.0.2.tgz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"100": "Continue", | |
"101": "Switching Protocols", | |
"102": "Processing", | |
"200": "OK", | |
"201": "Created", | |
"202": "Accepted", | |
"203": "Non-Authoritative Information", | |
"204": "No Content", | |
"205": "Reset Content", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const rTracer = require('cls-rtracer') | |
// first - configure winston logger | |
const { createLogger, format, transports } = require('winston') | |
const { combine, timestamp, printf } = format | |
// a custom format that outputs request id |
- First thing to consider when dealing with DOS attacks prevention is to limit the actual payload that user can submit to your app / api / service. You can limit the body payload using body-parser. If you are using ExpressJS as your backend framework, then you are golden. ExpressJS comes with built-in body-parser that you can use.
NewerOlder