Skip to content

Instantly share code, notes, and snippets.

View avidas's full-sized avatar
🎯
Busy creating tech debt

Avi Das avidas

🎯
Busy creating tech debt
View GitHub Profile
@avidas
avidas / file1.txt
Created January 29, 2014 21:31
xyz
String file
@avidas
avidas / file1.md
Last active August 29, 2015 13:55
open issues
@avidas
avidas / gist:fb822e75b511c1911d1f
Created June 14, 2014 18:40
ANDROID BOOTCAMP CLASS NOTES JUNE 09-13
ANDROID BOOTCAMP CLASS NOTES JUNE 09-13
=========
##DAY 1 (Ecosystem, Android Architecture, Security)
- developer.android.com is home for android tutorial, documentation and news. source.android.com is the url to get source for Android
- android not good for moving huge chunks of data
-

Build a subscription app with PayPal Python sdk, Flask, and Heroku

With the release of the subscription (recurring payment) APIs from PayPal, it is possible to create your anything-as-a-service buisness faster than ever. SDK integrations provide a native way to integrate with the PayPal APIs in the language of your choice. In this tutorial, we will walk through a sample application built using the PayPal Python sdk, the microframework Flask, Bootstrap for UI and Heroku for deployment.

Setting up

If you have not already, get your credentials from PayPal Developer Portal and see the Subscription api docs. Afterwards, set up the Python sdk. It may also be worth checking out Flask to see how to set up a simple web application (hello world is only 7 lines long!).

Merchant views

@avidas
avidas / nodeconf_notes.md
Last active August 29, 2015 14:23
2015 NodeConf Notes

NodeConf 2015 (June 11-13)

###Isomorphic JS

  • challenges/tradeoffs in writing identical code client/server side
  • write once, render anywhere
  • State does not live in the template
  • existing problem in server side rendering - how to present local timezone that represents client without passing client's timezone
  • Serving side is first class citizen in React
  • ways people have been getting around polyfills on polyfills, leveldb-browserify, leveljs
@avidas
avidas / merge_interval
Last active December 22, 2015 01:28
Given two lists with date ranges, return merged list with ranges from higher priority list preferred over ranges from lower priority list in case of intersection. Partial intervals are allowed.
def merge_interval(low_priority_lst,high_priority_lst):
'''
Given two lists with date ranges, return merged list with high_priority_lst ranges preferred over
preferred over low_priority_lst ranges in case of intersection. Partial intervals are allowed.
'''
if low_priority_lst == [] or low_priority_lst == None: return high_priority_lst
if high_priority_lst == [] or high_priority_lst == None: return low_priority_lst
# k way merge interval, also may need to mark which array it belongs to
# case : |-------|
@avidas
avidas / tvOS.md
Last active January 22, 2016 17:59
Apple TV Tech Talk in Austin December 15th

##Takeaways

  • Early trends: PhotoAlbum, On Demand TV, Games, Photo heavy apps e.g. Airbnb, Education for children
  • Apple puts a significant amount of preparation into their presentation. They follow a prompt and all talks follow exact same format.
  • It is early for tvOS but the constraints are interesting. Always connected device, need to access much bigger volume of resources.
  • Emphasize making an app designed for living room
  • tvOS app store has about 40% paid apps as opposed to 10% on iOS, but early to draw conclusion.
  • The framework provides utilites tailored specific to tv experiences, subtitles, playback, ratings, product catalogue information etc.

##INTRO

@avidas
avidas / gist:2b73496df5a49821013a
Created January 28, 2016 03:33 — forked from keithics/gist:fd53431b6f57014249ca
Mongodump and Amazon Glacier
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
AWS = require('aws-sdk'),
exec = require('child_process').exec,
fs = require('fs'),
name = new Date().toISOString();
@avidas
avidas / gist:971bf9cbad0db71e4d69
Last active January 31, 2016 00:39
Building a Realtime user monitoring and targeting platform with socket.io

Building Realtime user monitoring and targeting platform with Node, Express and Socket.io

Being able to target users and send targeted notifications can be key to turn visitors into conversions and tighten your funnel. Offerings such as mailchimp and mixpanel offer ways to reach out to users but in most of those cases you only get to do them in post processing. However, there are situations when it would be really powerful is to be able to track users as they are navigating your website and send targeted notifications to them.

###Use Cases Imagine that a buyer is looking for cars to buy and is interested in vehicles of a particular model and brand. It is very likely that he/she will visit several sites to compare prices. If there are a few results the buyer has looked at already, there may be an item which would fit the profile of this user. If you are able to prompt and reach out as the user is browsing through several results, it could make the difference between a sale and user buying from a different

@avidas
avidas / Recipes.md
Last active January 18, 2017 09:13
Home recipes from Dhaka

2017

Dal Choccori

Ingredients 2 bay leaves 4-5 green chili 1 teaspoon turmeric Trace amount of Dry cumin powder 3.5 tablespoons of oil 250g of Masoor Daal