Skip to content

Instantly share code, notes, and snippets.

View KenDB3's full-sized avatar

Kenny DiBattista KenDB3

  • Rhode Island, USA
View GitHub Profile
@KenDB3
KenDB3 / Coinbase-Historic-Days-Example-2017-12-23.json
Created July 19, 2018 07:31
Coinbase Historic Days Comparison
{
"data":{
"currency":"USD",
"prices":[
{
"time":"2017-12-23T00:00:00Z",
"price":"14564.66"
},
{
"time":"2017-12-22T00:00:00Z",
@KenDB3
KenDB3 / Substitute-Underscores-for-Spaces.bat
Last active November 10, 2019 12:30
Windows Batch File that takes a quoted text command line argument, removes the quotes, and replaces spaces with underscores
@ECHO OFF
REM Windows Batch File that takes a quoted text command line argument,
REM removes the quotes, and replaces spaces with underscores.
REM This is useful for passing an argument to another program.
REM Change Directory to where the Batch file is saved
CD /d "%~dp0"
set originalquotedtextwithspaces=%1
@KenDB3
KenDB3 / FWS-Score-Fix.js
Created August 30, 2017 03:30
This script specifically cleans up the Fresh Water Fishing Simulation score file for a system running Synchronet BBS software.
/*FWS-Score-Fix.js -by- KenDB3 of KD3net (http://bbs.kd3.us)
This script is meant for use with Synchronet BBSes.
It requires JSexec.exe (from SBBS) to be run from command line.
Usage:
This script specifically cleans up the Fresh Water Fishing
Simulation score file. It removes the Erase Display/Clear Screen control
sequence (ESC[J), the Erase Line/Clear to End of Line control sequences
(ESC[K), and any bare CR alone on a line (Carriage Return with no Line Feed).
@KenDB3
KenDB3 / LORD-Color-Fix.js
Last active March 23, 2017 14:15
This program takes a LORD Score Bulletin file that has unconverted LORD color codes (for example `1 for Dark Blue) and converts them to ANSI color codes.
/*LORD-Color-Fix.js -by- KenDB3 of KD3net (http://bbs.kd3.us)
This script is meant for use with Synchronet BBSes.
It requires JSexec.exe (from SBBS) to be run from command line.
Usage:
Do your LORD Score Bulletins look funky because people use multiple color
codes in their name? Do the extra LORD color codes throw off the alignment
of the bulletin? This program takes a LORD Score Bulletin file that has
unconverted LORD color codes (for example `1 for Dark Blue) and then
converts them to their equivalent ANSI color codes (Ex: ESC[0;34m).
@echo off
REM This script was built for a friend who needed to have a folder full of possible ANSI Welcome screens
REM named in a pattern of: welcome.1, welcome.2, welcome.3, etc....
REM The script will build an array of the files, get a count of how many are in the folder, and randomly
REM select a file to be converted to "welcome.clr".
REM Much google searching and reading through Stack Overflow was done, but the method works pretty well.
REM !!CHANGE THIS to your directory where the Welcome screens are stored!!
REM Quotes are needed if the folder path has spaces in it.
//colorize-text.js -by- KenDB3 of KD3net (http://bbs.kd3.us)
//This script is meant for use with Synchronet BBSes.
//It requires JSexec.exe (from SBBS) to be run from command line.
//It was written in the spirit of the 1991 program A2A - ASCII to ANSI file converter by David Kauffman A.K.A. Ansi.
//colorize-text.js takes a plain text file and adds Synchronet Ctrl-A colorization.
//If you prefer ANSI color encoding, you could convert the output file with the SBBS utility asc2ans.exe.
//Usage:
//Pick a color and intensity for Text, a color and intensity for Numbers, and a color and intensity for Non-Text Characters
//Add the colorize-text.js script to your mods (/sbbs/mods/) or your exec (/sbbs/exec/) directory.
@echo off
REM Create variables that store Weekday (WD), Day (D), Month (M), and the 4-digit Year (Y)
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set WD=%%i
set D=%%j
set M=%%k
set Y=%%l
)
@KenDB3
KenDB3 / weather.js
Last active August 21, 2018 13:50 — forked from nolageek/weather.js
//syncWXremix by KenDB3 - http://bbs.kd3.us
//Original syncWX by nolageek - http://www.capitolshrill.com/ & https://gist.github.com/nolageek/4168edf17fae3f834e30
//Weather Icon designs done in Ctrl-A colored ASCII (Synchronet Formatting) by KenDB3
//Weather Icons inspired by wego (Weather Client for Terminals), created by Markus Teich <teichm@in.tum.de> - https://github.com/schachmat/wego
//See License file packaged with the icons for ISC License
load("http.js"); //this loads the http libraries which you will need to make requests to the web server
load("sbbsdefs.js"); //loads a bunch-o-stuff that is probably beyond the understanding of mere mortals
var wungrndAPIkey = "xxxxx"; // put your wunderground API key here.
//Get one here: http://api.wunderground.com/weather/api/