Skip to content

Instantly share code, notes, and snippets.


GP paambaati

View GitHub Profile
paambaati / getNearest.js
Created Oct 22, 2015
Applying a filter on .getNearest() using RethinkDB and Thinky
View getNearest.js
const userId = '2ff8902e-97f0-431a-a51c-900a57532967';
const location = r.point(-20, 39);
const queryOptions = {index: 'location'};
// Getting nearest list of users, while also excluding `userId`.
UserModel.getNearest(location, queryOptions)
paambaati / tasker_airtel.xml
Created Jun 15, 2015
Tasker task to get a notification of your Airtel broadband usage
View tasker_airtel.xml
<TaskerData sr="" dvi="1" tv="4.7u1m">
<Task sr="task5">
<nme>Check Airtel Broadband Usage</nme>
<Action sr="act0" ve="7">
<Str sr="arg0" ve="3"></Str>
paambaati / launch.js
Last active May 5, 2022
Debug mocha tests using Visual Studio Code
View launch.js
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Run app.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
paambaati / myproject.conf
Created Feb 20, 2015
Sample nginx config with redirection issue
View myproject.conf
upstream myproject_upstream {
server {
listen 80;
root /Users/myusername/Projects/myproject/static;
paambaati / mongo_add_admin.js
Created May 17, 2014
Add an administrator account to MongoDB instance
View mongo_add_admin.js
user: "admin_username",
pwd: "admin_password",
role: "userAdminAnyDatabase",
db: "admin"
paambaati / upload_demo_html.html
Last active Mar 28, 2021
Uploading files using NodeJS and Express 4
View upload_demo_html.html
<form action="/upload" enctype="multipart/form-data" method="post">
<input type="text" name="title">
<input type="file" name="file">
<input type="submit" value="Upload">