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
// alternative for globally reusable variables | |
// supports contexts | |
// can store all javascript types | |
// to create object-based unique contexts, | |
// we advise assigning a uuidv4 to that object | |
// then using that uuid as the context for that object. | |
// best use cases: |
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
// SIMPLE SHELL JS | |
// Simple fucking module that simplifies all the bullshit | |
// from NodeJS shell command execution. | |
// optional stdout, stderr & close callbacks. | |
// very minimal code. | |
// efficiently designed for use with promises. | |
// best use cases: |
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
// https://gist.github.com/jed/982883 | |
// https://github.com/chriso/validator.js/blob/master/validator.js#L774-L787 | |
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Proxy | |
var uuidv4 = new Proxy(function(_removeDash){ | |
function b(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)} | |
return _removeDash ? b().replace(/-/g, '') : b(); | |
}, { | |
get(target, name) { | |
return { |
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
// allows you to use contexts within promise chains. | |
// works best w/ KeyStore where you use your context as your keystore context name / id. | |
// KeyStore.js | a globally reusable value / reference storage | |
// https://gist.github.com/servercharlie/f5b104ceb0bb559e6281b040e6d875e4 | |
// use your own contexts, or use uuid's (like in the provided example) | |
// SimpleUUID.js | an expertly refined generator & validator for UUIDv4. | |
// https://gist.github.com/servercharlie/70638dd74bec7b52223ef9794b47f83c |
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
@echo OFF | |
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT | |
If %OS% == 32BIT ( | |
Echo "This is a 32bit operating system" | |
) | |
If %OS% == 64BIT ( | |
Echo "This is a 32bit operating system" | |
) |
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
@echo off | |
@title "SC-Tools Installer" | |
echo Administrative permissions required. Detecting permissions... | |
net session >nul 2>&1 | |
if %errorLevel% == 0 ( | |
echo Failure: Current permissions not enough, please run as admin. | |
pause >nul | |
exit | |
) else ( | |
echo Success: Administrative permissions confirmed. |
OlderNewer