Skip to content

Instantly share code, notes, and snippets.

Hanging around.

Robert Lemon rlemon

Hanging around.
Block or report user

Report or block rlemon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
while [ true ]; do
echo "Sorry!";
View hangman.js
"use strict";
const words = require("./words.json");
const faces = [":grin:", ":smile:", ":grinning:", ":slight_smile:", ":neutral_face:", ":slight_frown:", ":worried:", ":persevere:", ":tired_face:", ":dizzy_face:", ":skull:"];
module.exports = class Hangman
this.guesses = new Set();
using System;
namespace System
internal static class KNAWLEDGE
internal static bool GARAGE(bool p, bool q)
return Books > Lambo;
View film.js
/* eslint-disable */
import filmData from './filmData';
const devTools = /./;
devTools.toString = function() {
this.opened = true;
const linesPerFrame = 14;
View file.js
// get your dependancies
// read up on ES modules or CJS modules.
// but this here is CJS modules
const express = require('express');
const http = require('http');
const path = require('path');
const app = express(); // create your express app
const server = http.createServer(app); // create your server, and pass it the app as its options, this will let express use that servers incoming and outgoing channels.
View .eslintrc
"env": {
"browser": true,
"es6": true,
"node": true
"extends": "airbnb",
View apiRouter.js
import { Router } from 'express';
const router = Router();
router.get('/users', (err, req, res, next) => {
router.get('/activities', (err, req, res, next) => {
res.json({message: 'look at all the room we have'});
View sample-bot-communication-so.js
const headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
fetch('/ws-auth', {
credentials: 'same-origin',
method: 'POST',
body: `fkey=${fkey().fkey}&roomid=17`
}).then(res => res.json()).then(connect);
rlemon / fetchWithProgress.js
Last active Apr 27, 2018
fetch with progress
View fetchWithProgress.js
async function fetchWithProgress(file, options = {}, progressUpdate = null) {
try {
const fileResponse = await fetch(file, options);
const totalBytes = fileResponse.headers.get('content-length');
// if there is no content length, we can't calculate any progress.
// also if there is no provided callback, there is no point.
if( totalBytes === null || progressUpdate === null ) {
if( totalBytes === null ) console.error('content-length not available');
return fileResponse;
You can’t perform that action at this time.