Skip to content

Instantly share code, notes, and snippets.

View parthibanloganathan's full-sized avatar

Parthi Loganathan parthibanloganathan

View GitHub Profile
class LetterdropProxy(HttpProxy):
base_url = 'https://{domain}.letterdrop.com'
verify_ssl = True
proxy_middleware = [
'djproxy.proxy_middleware.AddXFF',
'djproxy.proxy_middleware.AddXFH',
'djproxy.proxy_middleware.AddXFP',
'{pathToAddXFS class}.AddXFS'
]
class LetterdropAssetProxy(HttpProxy):
import mongoose from "mongoose";
const Schema = mongoose.Schema;
const userSchema = new mongoose.Schema({
email: {
type: String,
unique: true,
required: true
},
firebaseUserId: {
@parthibanloganathan
parthibanloganathan / getuser.js
Last active June 5, 2020 02:09
helpelf_getuser
import * as admin from "firebase-admin";
import User from "../models/user";
import express from "express";
var router = express.Router();
...
router.post(
"/getuser",
[],
async function getUserFromFirebaseId(firebaseUserId) {
let user = await User.findOne({ firebaseUserId: firebaseUserId });
if (user && user.adminControls.isAdmin) {
let spoofedUser = await User.findById(
user.adminControls.spoofUserId
);
if (spoofedUser) {
return spoofedUser;
### Keybase proof
I hereby claim:
* I am parthibanloganathan on github.
* I am parthi (https://keybase.io/parthi) on keybase.
* I have a public key whose fingerprint is D7E8 05D8 AB1A E8C8 0A86 2556 9F16 24FF D061 DABB
To claim this, I am signing this object:
Verifying that +parthi is my openname (Bitcoin username). https://onename.io/parthi
@parthibanloganathan
parthibanloganathan / README.md
Last active December 20, 2015 19:49
Foursquare widget for Dashing

Foursquare Widget

##Preview

Screenshot 1: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/foursquare1.png Screenshot 2: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/foursquare2.png

Description

Foursquare Widget for Dashing displays current checkins, total checkins and images of people checked in at a Foursquare venue.

@parthibanloganathan
parthibanloganathan / README.md
Last active July 22, 2016 17:48
Subway Info widget for Dashing

Subway Info

##Preview

Screenshot 1: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/mta1.png Screenshot 2: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/mta2.png

Description

Subway Info is a Dashing widget which displays information on trains in New York City. Information includes train line, direction, station and arrival time. You can customize it to include any combination of lines and stations. This may also be used in other cities as well if you have the appropriate GTFS files.