Skip to content

Instantly share code, notes, and snippets.

Kenny DiBattista KenDB3

  • Rhode Island, USA
View GitHub Profile
View Coinbase-Historic-Days-Example-2017-12-23.json
{
"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 Nov 30, 2017
Windows Batch File that takes a quoted text command line argument, removes the quotes, and replaces spaces with underscores
View Substitute-Underscores-for-Spaces.bat
@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 Aug 30, 2017
This script specifically cleans up the Fresh Water Fishing Simulation score file for a system running Synchronet BBS software.
View FWS-Score-Fix.js
/*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 Mar 23, 2017
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.
View LORD-Color-Fix.js
/*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).
View random-welcome-screen.bat
@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.
View colorize-text.js
//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.
View get-date.bat
@echo off
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set WD=%%i
set D=%%j
set M=%%k
set Y=%%l
)
for /F "tokens=1-4 delims=: " %%i in ('time /t') do (
set H=%%i
View 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/
You can’t perform that action at this time.