Skip to content

Instantly share code, notes, and snippets.

View arpit's full-sized avatar

Arpit Mathur arpit

View GitHub Profile
@arpit
arpit / simple_storage.sol
Last active April 9, 2018 20:04
Simple Storage Smart Contract
pragma solidity ^0.4.17;
contract SimpleStorage {
uint storedData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {

So far what we have learnt is about developing apps. But in a company software development is only part of the story, the other part is Software Delivery. This is where DevOps, Infrastructure Engineering etc roles come in.

Continuous Delivery and Continuous Integration

When you have no devops, you have a person doing the following:

  • Check out code from repository
  • Turn off web server
  • Deploy code
@arpit
arpit / twitter.rb
Created March 2, 2018 19:07
Modeling Twitter
#The goal of this exercise is to create the models for a app like Twitter. We are not going to use Rails, just plain old Ruby.
#The goal is to be able to generate timelines for each user. The final code should look like this:
twitter = Twitter.new
user1 = User.new("alice")
user1.tweet("hello world")
user1.tweet("So hungry today")
Rouge comes packed with a Sinatra test app.
To use it, you have to run this command in the root of the app:
```
rackup
```
which boots up a Sinatra server
When its running:
http://localhost:9292/?theme=monokai
/**
This code snippet shows how an Android activity can trigger a web based auth using webview and then use
the cookies from there to make subsequent calls to an API (since the api is checking the cookies to detect
sign in)
MyApplication: The root "controller" and the first activity in my app
OAuthLogin: A class that handles the web based login.
It montors the url change and if the user had been redirected to
a "success" page it sends out the cookie string to the root controller
Once the controller has the cookie, it sets those on the service that
@arpit
arpit / ethtest.md
Created July 26, 2017 18:49
TestNet address

0x3D143E0450Eb9A450846bb7b861F46D15B156D07

@arpit
arpit / aframe.md
Created June 21, 2017 18:27
Learning A Frame Notes

Setting up your device

On Android, Chrome make sure WebVR flags and GameController flags are turned on in chrome://flags

Local Dev:

Debugging:

Use cntrl+alt+i to bring up the visual inspector

@arpit
arpit / gist:cfb0a536377735f6a51b857d510bf36e
Last active May 23, 2017 06:10
Push a folder in a project to heroku
git push heroku `git subtree split --prefix tutorbotapiservice master`:master 

(add --force if needed)

Android:

  • AI enabled copy paste, on device neural networks (TensorFlowLite)
  • Picture in Picture
  • Autofill API
  • Vital: Improving battery life / core services
  • Kotlin support
  • Kotlin Foundation
  • Instant apps open to all
  • Android Go: Rethinking android for third world: Lighter apps, slimmer OS, data compression, api for network operators to manage usage/payments (top up)