Skip to content

Instantly share code, notes, and snippets.

View accelleratorcloud's full-sized avatar

Robert Ehteshamzadeh accelleratorcloud

View GitHub Profile
@accelleratorcloud
accelleratorcloud / generate-users.js
Created July 13, 2020 19:45 — forked from tkh44/generate-users.js
Generate users using randomuser.me and insert them into mongodb
var unirest = require('unirest');
var mongoose = require('mongoose');
var User = require('../models/User');
var async = require('async');
var secrets = require('../config/secrets');
mongoose.connect(secrets.db);
mongoose.connection.on('error', function() {
console.error('MongoDB Connection Error. Make sure MongoDB is running.');
});
@accelleratorcloud
accelleratorcloud / server.py
Created March 18, 2021 17:46 — forked from peterkuma/server.py
A flask server for serving all JPEG images in a local directory and subdirectories. Uses unveil.js for lazy-loading of images. Thumbnails are created on the fly by PIL.
#!/bin/python
import os
from flask import Flask, Response, request, abort, render_template_string, send_from_directory
import Image
import StringIO
app = Flask(__name__)
WIDTH = 1000