Skip to content

Instantly share code, notes, and snippets.

View jhonywalkeer's full-sized avatar
🎯
Focusing

Jhony Walker jhonywalkeer

🎯
Focusing
View GitHub Profile
@jhonywalkeer
jhonywalkeer / checkCertificate.js
Created July 18, 2022 23:08
It involves making an HTTPS request of the HEAD type and comparing the expiration date of the certificate obtained from the response object and the successful status of the SSL transaction (handshake) as reported by the underlying socket.
'use strict';
const https = require('https');
const validator = require('validator');
const getDaysBetween = (validFrom, validTo) => {
return Math.round(Math.abs(+validFrom - +validTo) / 8.64e7);
};

See how a small change in the style of your commit message can make you a better programmer using the semantic commit convention in GIT:

build - Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci - Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
docs - Documentation only changes
feat - A new feature
fix - A bug fix
perf - A code change that improves performance
refactor - A code change that neither fixes a bug nor adds a feature

@jhonywalkeer
jhonywalkeer / PowerShell
Last active October 12, 2021 00:21
Enable Windows Subsystem for Linux
⚠ Run as Admin
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
@jhonywalkeer
jhonywalkeer / PowerShell
Created October 4, 2021 16:12
Enable the Virtual Machine feature through PowerShell
⚠ Run as Admin
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
@jhonywalkeer
jhonywalkeer / build.gradle
Created October 4, 2021 16:09
Making it easy to debug errors that appear on the Google console by passing just this code and the project will be built with the code without minification
....
project.ext.react = [
entryFile: 'packages/mobile/index.js',
root: '../../../../',
enableHermes: false,
extraPackagerArgs: [ '--minify=false' ],
]
@jhonywalkeer
jhonywalkeer / bilingValidator.js
Last active October 1, 2021 03:36
Integrating Google Play Billing Validator with Node.js
var GoogleReceiptVerify = require('google-play-billing-validator')
// some module that handles management of subscription data
var Subscriptions = require('../data/Subscriptions')
// instantiate google receipt verify
var googleReceiptVerify = new GoogleReceiptVerify({
email: ServiceAccount.client_email,
key: ServiceAccount.private_key
});