Skip to content

Instantly share code, notes, and snippets.

View Efreak's full-sized avatar
😴
😪😴🥱😌💤

Efreak Efreak

😴
😪😴🥱😌💤
View GitHub Profile
@Efreak
Efreak / irc-steam-relay.js
Last active August 29, 2015 14:06
seishun/steam-irc-relay hacked to work with node-steam-chat-bot
/*
To use:
1. 'npm install steam irc' in your main bot directory
2. add the following to the end of your config.js file
var relay = require('./irc-steam-relay.js');
3. Below that, add the relay({ code FAQ at https://github.com/seishun/irc-steam-relay
- leave out the username, password, and authCode fields.
- Add another field, steamClient: myBot (where myBot is the name of your bot object, as seen in https://github.com/efreak/node-steam-chat-bot/blob/master/example.js#L6)
*/
@Efreak
Efreak / logTrigger.js
Created October 1, 2014 09:22
winston is failing to flush log files with DailyRotateFile
var util = require('util');
var winston = require('winston');
var BaseTrigger = require('./baseTrigger.js').BaseTrigger;
var TinyCache = require( 'tinycache' );
var cache = new TinyCache();
/*
Trigger that logs chat messages to files by groupchat "bot.groupsteamid64.date.log". You NEED to put this trigger first, or it might not log everything. Removes unnecessary line breaks (keeps single breaks, but lines with just spaces or nothing will be removed)
prefix = string - what to prefix the logfiles with. Defaults to "bot." After this comes a '.', the bot's username, another ., the 'name' (see next option) of the groupchat (or steamid64) and a ., then the date.
roomNames = {} - object containing group names by steamid64, to be used in filenames. {'steamid64':'GroupName','steamid64':'GroupName'}
html = string/bool - Set to true to enable html output. Each chat line will be <p><span class="timestamp">timestamp</span> &lt;<a href="linktoprofilebysteamid64" class="username">profile name</a>&gt; - <span class="messag
/**
* Original by Zirak @ http://stackoverflow.com/a/8636050/1012431
*
* Had some issues with the clear function
*
* @type {{intervals: Array, make: make, clear: clear, clearAll: clearAll}}
*/
var interval = {
//to keep a reference to all the intervals
intervals : [],
sudo apt-get install -y aria2
sudo mkdir /etc/aria2
sudo touch /etc/aria2/aria2.session
sudo bash -c "cat <<EOT > /etc/aria2/aria2.conf
daemon=true
continue=true
enable-rpc=true
rpc-listen-port=6800
rpc-listen-all=true
check-certificate=false
2015-06-25T03:19:21.492Z - info: [censoredbotname]/logTrigger: Logfile request by [censoredipaddress]
2015-06-25T03:19:21.494Z - info: HTTP 200 [censoredipaddress] GET 1ms trivia.efreakbnc.net/live url=/live, connection=upgrade, host=trivia.efreakbnc.net, x-real-ip=[censoredipaddress], x-forwarded-for=[censoredipaddress], pragma=no-cache, cache-control=no-cache, accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8, user-agent=Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2431.0 Safari/537.36, https=1, dnt=1, accept-encoding=gzip, deflate, sdch, accept-language=en-US,en;q=0.8, method=GET, httpVersion=1.1, originalUrl=/live, , statusCode=200, responseTime=1
2015-06-25T03:19:22.127Z - info: [censoredbotname]/logTrigger: [censoredipaddress] connected via websocket
2015-06-25T03:19:27.542Z - info: [censoredbotname]/logTrigger: [censoredipaddress] connected via websocket
2015-06-25T03:19:42.607Z - info: [censoredbotname]/logTrigger: Logfile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Running windows 98 SE under dosbox

You'll want Daum's SVN version of dosbox, not the latest stable version.

You need to have an MSDOS boot floppy disk image available, that's the boot622.ima file.

You also need to convert your windows 98SE iso file into a hard drive image, and IIRC WinImage is the easiest way to do this.

The commands at the end of dosbox.conf will need to be commented out in order for you to perform the above steps.

@Efreak
Efreak / -
Created October 11, 2015 19:55
{ name: 'steam-chat-bot',
description: 'Simplified interface for a steam chat bot with lots of built-in functionality',
'dist-tags':
{ latest: '2.2.0',
senpaiplznoticemeeeeeee: '2.1.0',
GabenForPresident: '2.3.0' },
versions:
[ '1.0.0',
'1.1.0',
// To run this example without first copying it outside of node_modules/steam-chat-bot, use ./ as the require path, e.g.:
// var ChatBot = require("./").ChatBot
var ChatBot = require("steam-chat-bot").ChatBot;
var myBot = new ChatBot("xxx", "xxx", {
//this is required on the first run if you have steamguard enabled, but not after that.
guardCode: 'TFP9X',
//the built-in webserver is enabled by default
disableWebServer: false,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.