Skip to content

Instantly share code, notes, and snippets.

View dejosli's full-sized avatar
🏢
Working from Office

Josli De Silva dejosli

🏢
Working from Office
View GitHub Profile
@dejosli
dejosli / Office_kms
Created August 14, 2024 04:17 — forked from OkoyaUsman/Office_kms
KMS server Windows
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /sethst:kms.digiboy.ir
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
@dejosli
dejosli / Online KMS Activator.cmd
Created August 14, 2024 04:17 — forked from jsakhil/Online KMS Activator.cmd
Activate Windows & Office for 180 Days with online KMS Servers. This script does not install any files in your system and it clears all the leftovers including kms server name after the Activation. For Successful Activation, Internet Must be connected.
@echo off
::::::::::::::::::::::::::::
set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
:: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
:GotPrivileges
::::::::::::::::::::::::::::
color 1F
@dejosli
dejosli / windows_and_office_kms_setup.adoc
Created August 14, 2024 04:17 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@dejosli
dejosli / README.MD
Created November 5, 2023 06:19 — forked from caeb92/README.MD
PM2 fork and cluster mode configuration examples

Configure a new PM2 ecosytem

You must especificate the file JSON wich have the proper configuration for your app wich environment do you want to use (declared in your ecosystem file).

pm2 start ecosystem_cluster_mode.json --env production
pm2 save (Autostart your application when PM2 service is started/restarted)
pm2 ls (Shows PM2 runnings apps)
netstat -ntpl | grep pm2 (Filter running PM2 applications)

Flag --env

@dejosli
dejosli / Speedify-Setup.md
Created February 23, 2023 18:01 — forked from ttyler01/Speedify-Setup.md
These are the things I did to configure Speedify on my Raspberry Pi to bond 3 DSL modems for my house

Intro

I live in a semi-rural area and we have crap internet options. The ONLY wired service to my house is ATT DSL. In 2020 some of the neighbors convinced ATT to sell us business accounts, which allows us to have more than 1 DSL line to the house (we got 3). Rather than run multiple WiFi networks - one for each DSL modem - at my house I wanted to bond the lines and aggregate the bandwidth. ATT won't do this for you, even though the DSL modems support it.

Along comes Speedify (https://speedify.com). For around $130 for three years you get a service that allows you to multiplex an arbitrary number of lines. Many people would use this, for instance, with a laptop if they have

@dejosli
dejosli / npm-packages.md
Last active April 16, 2022 07:50
A list of npm packages require for software development
@dejosli
dejosli / node-folder-structure-options.md
Created April 11, 2022 05:13 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
// Import express into our project
const express = require("express");
// Import multer
const multer = require("multer");
// Creating an instance of express function
const app = express();
// Import dotenv
@dejosli
dejosli / after_res_hooks.js
Created April 7, 2022 06:47 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info