Skip to content

Instantly share code, notes, and snippets.

View mjrb's full-sized avatar

Mickey J Winters mjrb

  • New York City area
View GitHub Profile
@mjrb
mjrb / app.py
Created January 12, 2021 04:52
flask example
def print_wrapper(f):
def wrapped(*args, **kwargs):
result = f(*args, **kwargs)
print(result)
return result
return wrapped
def add(a, b):
return a + b
add = print_wrapper(add)
@mjrb
mjrb / profile_service.py
Created July 9, 2019 13:20
py-lcs-client prototype
import requests
LOGIN = "/authorize"
READ = "/read"
DM = "/coms/dm"
class ProfileService:
def __init__(self, lcs_url, store=ProfileStore("mongodb://localhost:27017")):
self.lcs_url = lcs_url
self.store=store
@mjrb
mjrb / README.md
Last active June 27, 2019 04:24
simple todo api using sinatra and mongoid.

Todo Api (exercise)

I haven't got much time to play around with new stuff lately so I decided to try out sinatra and mongoid. I've never used an ORM/ODM but I do like mongodb, and mongoid can remove some boilerplate. After working with a bunch of other languages that I like with varying degree, it felt like a breath of fresh air to go back to my ruby roots.

required gems (if i can remeber)

  • sinatra
  • sinatra-contrib
  • mongoid
@mjrb
mjrb / App.js
Created April 28, 2019 18:35
using firebase for mentorq
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import firebase from "firebase";
import {LcsClient} from "js-lcs-client";
var defaultApp = firebase.initializeApp({
apiKey: "",
authDomain: "",
projectId: "",
databaseURL: ""
@mjrb
mjrb / core.cljs
Created August 1, 2018 04:16
npm-deps-test
(ns stij4m.core
(:require [mongodb-stitch-browser-core :as core]
[mongodb-stitch-browser-sdk :as stitch]))
(enable-console-print!)
(println "This text is printed from src/stij4m/core.cljs. Go ahead and edit it and see reloading in action.")
(defn on-js-reload []
;; optionally touch your app-state to force rerendering depending on