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 / reveng-121-cancel-mi.rb
Last active August 15, 2017 11:31
Cancel Move In for Finalized SD Invoice Reservations https://jira.we.co/browse/REVENG-121
# JIRA: REVENG-121
# cancel move in for Office 16-116 in Tower 49 for Gimbal EUAETK
begin
Rails.logger.info "JIRA REVENG-121 starting to cancel move in for Office 16-116 in Tower 49 for Gimbal EUAETK"
TenantService.switch_to_rest_of_world_tenant
pr = PrimaryReservation.find(600203682)
pr.canceled_at = DateTime.new(2017,9,1)
pr.save!
Rails.logger.info "JIRA REVENG-121 done canceling move in for Office 16-116 in Tower 49 for Gimbal EUAETK "
end
@avidas
avidas / update_mexico_shortcodes.rb
Last active August 10, 2017 20:43
Reveng-137 - Change short codes for buildings
# JIRA: REVENG-137
begin
Rails.logger.info "JIRA REVENG-137 starting to update location codes"
Location.find_by_code('MXC08').update!(code: 'MXC01') # Insurgentes 601
Location.find_by_code('RJ04').update!(code: 'RJ03') # Piraja
Rails.logger.info "JIRA REVENG-137 done"
end
@avidas
avidas / reveng-121-cancel-mimo.rb
Last active August 11, 2017 15:38
Cancel Move In / Move Out for Finalized SD Invoice Reservations https://jira.we.co/browse/REVENG-121
# JIRA: REVENG-121
# cancel move in for Office 16-116 in Tower 49 for Gimbal EUAETK
begin
Rails.logger.info "JIRA REVENG-121 starting to cancel move in for Office 16-116 in Tower 49 for Gimbal EUAETK"
TenantService.switch_to_rest_of_world_tenant
pr = PrimaryReservation.find(600203682)
pr.canceled_at = DateTime.new
pr.save!
Rails.logger.info "JIRA REVENG-121 done canceling move in for Office 16-116 in Tower 49 for Gimbal EUAETK "
end
@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 / 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 / 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 / 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

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 / 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
-