Skip to content

Instantly share code, notes, and snippets.

View arpit's full-sized avatar

Arpit Mathur arpit

View GitHub Profile
@arpit
arpit / create_linear_gradiet.dart
Created February 24, 2020 03:22
Creates a linear gradient in Flutter
static LinearGradient getGradient(Color color, double ratio, double sign) {
return LinearGradient(
colors: [
color.withOpacity(ratio * 1.0),
color.withOpacity(ratio * 0.30),
color.withOpacity(ratio * 0.10),
],
stops: [
0.012,
0.012,
@arpit
arpit / flutter.md
Last active May 10, 2020 05:06
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.

String s = "😀 hello";
s.runes.forEach((int i){
String x = String.fromCharCode(i); // Get emoji as 1 string and now 2 CodePoints
}
@arpit
arpit / dart_snippets.md
Last active July 22, 2019 15:10
Dart snippets

Null check operator ??

String name = person.name ?? "Adam"

Optional ?.

pages[0]?.contributors[0]?.authorDetails?.basicInfo?.firstName ?? 
@arpit
arpit / ml.md
Last active July 25, 2019 01:07
Learning ML
@arpit
arpit / setInterval.md
Last active September 10, 2018 20:58

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
arpit / technologies.md
Last active September 25, 2025 11:07
List of Software Technologies

App Development

  • Android
    • Java
    • Kotlin
  • iOS
    • Objective C
    • Swift
  • Cross Platform
    • React Native
  • Flutter
@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