Skip to content

Instantly share code, notes, and snippets.

Arpit Mathur arpit

Block or report user

Report or block arpit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
arpit /
Last active Dec 20, 2019
Flutter notes

Sizing Widgets:

  • Expanded
  • Flexible
  • LimitedBox <-> ConstrainedBox
  • FittedBox
  • SizedBox

Note: When creating widgets in column / row, if the size is too big (like when presenting in a modal screen) use the attribute: mainAxisSize.min to contain the widget

Use Spacer when you want to create space using a flex property. Use SizedBox when you want to create space using a specific number of logical pixels.

View emoji.dart
String s = "😀 hello";
s.runes.forEach((int i){
String x = String.fromCharCode(i); // Get emoji as 1 string and now 2 CodePoints
arpit /
Last active Jul 22, 2019
Dart snippets

Null check operator ??

String name = ?? "Adam"

Optional ?.

pages[0]?.contributors[0]?.authorDetails?.basicInfo?.firstName ?? 
arpit /
Last active Jul 25, 2019
Learning ML

setInterval and clearInterval are top level functions part of JavaScript

What does that mean?

Basically these functions are defined by the window object. You can either call this function like window.setInterval( ... ) or just setInterval( ... )

setinterval is used to call any function again and again every few milliseconds.

It takes 2 parameters: the function to call periodically and what the duration between the calls is. So for example:

arpit /
Last active Aug 15, 2018
List of Software Technologies

App Development

  • Android
    • Java
    • Kotlin
  • iOS
    • Objective C
    • Swift
  • Cross Platform
    • React Native
    • Flutter
arpit / simple_storage.sol
Last active Apr 9, 2018
Simple Storage Smart Contract
View simple_storage.sol
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 / twitter.rb
Created Mar 2, 2018
Modeling Twitter
View twitter.rb
#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 =
user1 ="alice")
user1.tweet("hello world")
user1.tweet("So hungry today")
You can’t perform that action at this time.