Skip to content

Instantly share code, notes, and snippets.

@brianpmarks
brianpmarks / trinket-replit.js
Created October 29, 2015 16:36
wrapper around replit api and jqconsole
(function(Trinket) {
function Replit(language) {
this._client = undefined;
this._connected = false;
this._running = false;
this._reconnect = false;
this._language = language;
this._history = [];
this._reinitClient = function() {
@brianpmarks
brianpmarks / trinket-replit-python3.js
Created October 29, 2015 16:34
shows replit connection and timeout logic
function runConsole() {
var prog = preRun()
, serializedCode = api.getValue()
, commands = [], history = []
, input;
if (prog) {
history = prog.split('\n');
}