Skip to content

Instantly share code, notes, and snippets.

View lexico4real's full-sized avatar
🎯
Focusing

Oluyinka Abubakar lexico4real

🎯
Focusing
View GitHub Profile
@lexico4real
lexico4real / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Created September 1, 2024 23:21
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

WATCH OUT FOR SUSPICIOUS LINKS IN THE COMMENTS BELOW!

I noticed that people or bots are trying to place suspicious links below that link to some sketchy source for what they say is a 'crack' or nothing at all. I'd recommend you to NOT click on any of those links! The scripts in this guide are open source and can be viewed as desired. I'm fine with posting coupons here! Do note that if you do so, please prove it! Link a review site along with the site and the coupon. Thanks, Minionguyjpro.

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that

@lexico4real
lexico4real / node_nginx_ssl.md
Created December 17, 2022 23:05 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@lexico4real
lexico4real / client-axios.js
Created September 12, 2022 21:43
Nestjs File download
export default class http {
async download(endpoint) {
const token = this.loadToken();
const invoice = await axios({
url: `${this.NEST_APP_IP}/${endpoint}`,
method: 'GET',
responseType: 'blob',
headers: {
Authorization: `Bearer ${token}`
}}).then((response) => {
@lexico4real
lexico4real / users.controller.ts
Created September 12, 2022 21:35 — forked from prateekkathal/users.controller.ts
For Medium Article (Creating/Writing/Downloading Files in NestJS)
// This file should exist in `src/models/users`
import { UsersService } from "./users.service";
import { Response as ExpressResponse } from "express";
import { Controller, Get, Response } from "@nestjs/common";
/**
* Controller dealing with user entity based operations.
*
* @class
*/
@lexico4real
lexico4real / storage.helper.ts
Created September 12, 2022 21:31 — forked from prateekkathal/storage.helper.ts
For Medium Article (Creating/Writing/Downloading Files in NestJS)
// This file should exist in `src/common/helpers`
import fs from 'fs';
import { promisify } from 'util';
/**
* Check if a file exists at a given path.
*
* @param {string} path
*
* @returns {boolean}
@lexico4real
lexico4real / users.service.ts
Created September 12, 2022 21:30 — forked from prateekkathal/users.service.ts
For Medium Article (Creating/Writing/Downloading Files in NestJS)
// This file should exist in `src/models/users`
import { parse } from "json2csv";
import { Injectable, NotFoundException } from "@nestjs/common";
import {
getFile,
createFile,
checkIfFileOrDirectoryExists,
} from "./../../common/helpers/storage.helper";
/**
@lexico4real
lexico4real / gist:66dc34ee7ecabe668cf38dd9ef81e7c2
Created June 8, 2022 07:10 — forked from TessMyers/gist:a252520dd9a8fe68f8e5
Simple exercises using .map and .reduce
// Simple problems to solve using the native .reduce and .map array methods. Each of these problems can be solved in many
// different ways, but try to solve them using the requested higher order function.
// MAP
// Write a function capitalize that takes a string and uses .map to return the same string in all caps.
// ex. capitalize('whoop') // => 'WHOOP'
// ex. capitalize('oh hey gurl') // => "OH HEY GURL"
var capitalize = function(string){
// code code code!
@lexico4real
lexico4real / sortArticles.js
Created May 26, 2022 17:13 — forked from adityak74/sortArticles.js
Sort Articles by Comments and Alphabetic Hackerrank Solution
/*
* Complete the 'topArticles' function below.
*
* The function is expected to return a STRING_ARRAY.
* The function accepts INTEGER limit as parameter.
* base url for copy/paste:
* https://jsonmock.hackerrank.com/api/articles?page=<pageNumber>
*/
const https = require('https');
const makeRequest = (pageNumber = 1) => new Promise((resolve, reject) => {
@lexico4real
lexico4real / count-change.js
Created May 13, 2022 22:37 — forked from meetKazuki/count-change.js
Some Qualified.io Code Snippets
/**
* Write a function that counts how many different ways you can make
* change for an amount of money, given an array of coin denominations.
*
* The order of coins does not matter
*/
function countChange(money, coins) {
let waysOfDoingNcents = [];
for (let i = 0; i <= money; i++)
waysOfDoingNcents[i] = 0;
@lexico4real
lexico4real / index.js
Created March 12, 2022 22:07 — forked from DercilioFontes/index.js
Sum Array of Numbers - Lighthouse Labs
function sumItems(array) {
// Sum all the numbers in the array
let sum = 0;
for (const item of array) {
if (Array.isArray(item)) {
sum += sumItems(item);
} else {
sum += item;
}
}