Skip to content

Instantly share code, notes, and snippets.

View tracker1's full-sized avatar

Michael J. Ryan tracker1

View GitHub Profile
@tracker1
tracker1 / Global.asax.cs
Created June 26, 2015 18:42
Application_OnError Handler, take care of JS expected responses.
protected void Application_Error(object sender, EventArgs e)
{
var status = 500;
// Get the error details
var lastError = Server.GetLastError();
HttpException lastErrorWrapper = Server.GetLastError() as HttpException;
if (lastErrorWrapper != null)
{
@tracker1
tracker1 / post-object-from-form.js
Created August 7, 2015 23:25
Post JSON object as form
//assumes jQuery
import clone from 'safe-clone-deep'
import encode from './html-encode';
export default function postObjectFromForm(url, data, options = {}) {
data = clone(data);
//console.log('postObjectFromForm', {url, data, options});
var form = $(`<form method="post" action="${encode(url)}"></form>`);
if (options.target) form.attr('target', options.target);
@tracker1
tracker1 / sbbs-install-errors.log
Created August 14, 2015 04:14
sbbs install issues
This file has been truncated, but you can view the full file.
cvs checkout: Updating src/build
cvs checkout: Updating src/sbbs3
cvs checkout: Updating src/sbbs3/chat
cvs checkout: Updating src/sbbs3/ctrl
cvs checkout: Updating src/sbbs3/dosxtrn
cvs checkout: Updating src/sbbs3/execvxd
cvs checkout: Updating src/sbbs3/gtkchat
cvs checkout: Updating src/sbbs3/gtkmonitor
cvs checkout: Updating src/sbbs3/gtkmonitor/pixmaps
cvs checkout: Updating src/sbbs3/gtkuseredit
@tracker1
tracker1 / .bash_profile
Last active January 7, 2016 05:52
Start ssh-agent in msysgit bash
# Add the following line to your .bash_profile
. start-ssh-agent.sh
@tracker1
tracker1 / README.md
Last active May 11, 2019 14:37
Web.config file for synchronet on IIS

You'll need windows server, or windows pro for this, so that you have IIS. I'm running Windows 10 Pro.

Move your BBS's Web settings to bind on port 8000 (or any internal port you choose).

Install Application Request Routing (ARR)

Add your BBS's web/root directory to a new website in IIS, you must specify a host name, you can add additional host names under bindings.

My web.config file below, this file should also go into your web/root. You'll need to replace localhost:8000 with the appropriate port you are using. You sould also replace the www\.roughneckbbs\.com and www.roughneckbbs.com references with your host name.

import {createAction} from 'redux-actions'
import {
SOMETHING_STARTED,
SOMETHING_SUCCESS,
SOMETHING_ERROR
} from './constants';
export const somethingStarted = createAction(SOMETHING_STARTED);
export const somethingSucceeded = createAction(SOMETHING_SUCCESS);
export const somethingFailed= createAction(SOMETHING_ERROR);
@tracker1
tracker1 / newW2.js
Last active June 8, 2016 06:39 — forked from joetemp/newW2.js
const request = require('request-promise');
const moment = require('moment');
const getId = url => request(url).then(b => JSON.parse(b).data);
function getSoonItems(deal, type) {
return deals.filter(deal => (
deal.stage_id === app && deal[type.key] === type.refi ||
deal.stage_id === app && deal[type.key] === type.purchase && deal[pbl.key] === pbl.no
)).reduce((obj, deal) => { ...obj, [deal.id]:deal });
@tracker1
tracker1 / npm-scripts_pretest.js
Created January 25, 2017 01:27
Node.js PreTest script
const path = require('path');
const glob = require('glob');
const base = path.resolve(__dirname, '../');
const allScripts = glob.sync(path.join(__dirname, '../src') + '/**/*.js');
const tests = allScripts.filter(s => (/\.test\.js$/).test(s));
const scripts = allScripts.filter(s => !(/\.(test|disabled|unsafe)\./).test(s));
const untested = scripts.filter(s => !tests.includes(s.replace(/\.js$/,'.test.js')));
@tracker1
tracker1 / normalize-to-string.js
Created February 9, 2017 01:11
prehash password
export default function normalizeToString(input) {
// string or String object
if (typeof input === 'string' || input instanceof String) return input.toString();
// boolean value
if (typeof input === 'boolean') return input.toString();
// numeric value
if (typeof input === 'number' || input instanceof Number) {
// not a finite value - invalid input - return empty
@tracker1
tracker1 / settings.js
Created February 22, 2017 18:57
My vscode user settings for OSX
{
// Enable/disable JavaScript validation.
// using eslint plugin instead
"javascript.validate.enable": false,
"files.autoSave": "off",
"editor.tabSize": 2,
"editor.fontFamily": "Inconsolata, Menlo, Monaco, 'Courier New', monospace",