Skip to content

Instantly share code, notes, and snippets.

Avatar

Arpit Mathur arpit

View GitHub Profile
@arpit
arpit / cryptokitties.sol
Created Jan 23, 2018
Cryptokitties Contract from the Eth blockchain
View cryptokitties.sol
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
@arpit
arpit / technologies.md
Last active Nov 19, 2022
List of Software Technologies
View technologies.md

App Development

  • Android
    • Java
    • Kotlin
  • iOS
    • Objective C
    • Swift
  • Cross Platform
    • React Native
  • Flutter
@arpit
arpit / Android TimeZone Ids
Created Jun 20, 2011
List of all Android TimeZone ids
View Android TimeZone Ids
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
View design.md
@arpit
arpit / indiehackerhome.js
Created Feb 15, 2022
A userscript for TamperMonkey that adds a home button to IndieHackers.com
View indiehackerhome.js
// ==UserScript==
// @name Indiehackers home button
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add Home to IndieHackers.com
// @author Arpit Mathur
// @match https://www.indiehackers.com/*
// @icon https://www.google.com/s2/favicons?domain=indiehackers.com
// @grant none
// ==/UserScript==
@arpit
arpit / google_io_2021.md
Created May 21, 2021
News from I/O 2021
View google_io_2021.md

Google IO

AI:

  • New conversational dialog model LAMDA
  • MUM AI model for Search: Better understanding of queries, learns 75 languages together, 1000x more powerful vs Bert
  • "I’ve hiked Mt. Adams and now want to hike Mt. Fuji next fall, what should I do differently to prepare?"
  • Starline
  • Photos create memories based on object detection
  • Cinematic moments > add frames between images > Apple live photos (which record video)
@arpit
arpit / Carat.js
Created Mar 4, 2012
Setting the carat in a contentEditable div
View Carat.js
function setCaratTo(contentEditableElement, position)
{
var range,selection;
if(document.createRange)//Firefox, Chrome, Opera, Safari, IE 9+
{
range = document.createRange();
range.selectNodeContents(contentEditableElement);
//range.collapse(true);
@arpit
arpit / flutter.md
Last active May 10, 2020
Flutter notes
View flutter.md

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.

@arpit
arpit / create_linear_gradiet.dart
Created Feb 24, 2020
Creates a linear gradient in Flutter
View create_linear_gradiet.dart
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,