This file contains hidden or 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
// jshint esversion:8 | |
// jshint node:true | |
'use strict'; | |
const https = require('https'); | |
const http = require('http'); | |
/* | |
request |
This file contains hidden or 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
/* | |
loginFacebook | |
Login to Facebook using email and password | |
.parameters | |
page (object) - Page object | |
credentials (object) - Credentials object with email and password properties | |
.returns | |
success (boolean) - Login to facebook success | |
*/ | |
async function loginFacebook(page, credentials = {}) { |
This file contains hidden or 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
/* | |
getPageName | |
Get page name | |
.parameters | |
page (object) - Page object | |
options (object) - Options object | |
.returns | |
pageName (string) - Page name | |
*/ | |
async function getPageName(page, options = {}) { |
This file contains hidden or 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
# Enable update service (Services) | |
Set-Service AdobeARMservice -StartupType Automatic | |
Start-Service AdobeARMservice | |
# Enable Adobe Genuine Monitor Service | |
Set-Service AGMService -StartupType Automatic | |
Start-Service AGMService | |
# Enable Adobe Genuine Software Integrity Service | |
Set-Service AGSService -StartupType Automatic |
This file contains hidden or 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
# Disable update service (Services) | |
Set-Service AdobeARMservice -StartupType Disabled | |
Stop-Service AdobeARMservice -Force -NoWait | |
# Disable Adobe Genuine Monitor Service | |
Set-Service AGMService -StartupType Disabled | |
Stop-Service AGMService -Force -NoWait | |
# Disable Adobe Genuine Software Integrity Service | |
Set-Service AGSService -StartupType Disabled |
This file contains hidden or 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
/* | |
isObjectEmpty | |
Check if a given object is empty | |
.parameters | |
object (object) - Object to check whether its empty or not | |
.returns | |
true or false (boolean) - True if object is empty, false otherwise | |
*/ | |
function isObjectEmpty(object) { | |
return (Object.keys(object).length === 0 && object.constructor) === Object ? true : false; |
This file contains hidden or 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
/* | |
isObject | |
Check if given variable is an object | |
.parameters | |
variable (any) - Variable to test for object type | |
.returns | |
true or false (boolean) - True if is object, false otherwise | |
*/ | |
function isObject(variable) { | |
return (typeof variable === 'object' && variable !== null) ? true : false; |
This file contains hidden or 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
/* | |
truncateString | |
Truncate a given string | |
.parameters | |
string (string) - String to truncate | |
charNum (integer) - Number of chars to truncate for | |
useWordBoundary (boolean) - Use word boundaries, default: false | |
.returns | |
truncatedString (string) - Truncated string, original string if is below char count | |
*/ |
This file contains hidden or 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
Get-MailboxDatabaseCopyStatus -Server $env:ComputerName | Format-Table Name,Status,ContentIndex* -Auto |
This file contains hidden or 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
# Enable Realtek driver power management, this is the default value | |
REG ADD "HKCU\Software\Realtek\RAVCpl64\PowerMgnt" /v "Enabled" /t REG_DWORD /d 1 /f | |
# Disable Realtek driver power management, sometimes fixes realtek popping sound | |
REG ADD "HKCU\Software\Realtek\RAVCpl64\PowerMgnt" /v "Enabled" /t REG_DWORD /d 0 /f | |
# Replace XXXX with the corresponding key that has "Realtek" in the "DriverDesc", find using regedit | |
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\XXXX\PowerSettings" /v "IdlePowerState" /t REG_BINARY /d "ffffffff" /f | |
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\XXXX\PowerSettings" /v "PerformanceIdleTime" /t REG_BINARY /d "ffffffff" /f | |
# Example if class is in 0000 |