Skip to content

Instantly share code, notes, and snippets.

View anta40's full-sized avatar

Andre anta40

  • Jakarta, Indonesia
  • 08:11 (UTC +07:00)
View GitHub Profile
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'dart:async';
class ServicePetrolPage extends StatefulWidget {
// HomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
import 'package:flutter/material.dart';
import 'package:good_driver_app/common/ExpandedButton.dart';
class TestPage01 extends StatefulWidget {
// HomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
@anta40
anta40 / MainActivity.kt
Created April 25, 2019 07:29
Show current latitude & longitude in Kotlin
package com.anta40.app.locationtest
import android.Manifest
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
import android.content.pm.PackageManager
import android.location.Location
import android.location.LocationManager
import android.support.v7.app.AppCompatActivity
@anta40
anta40 / MapsActivity.kt
Created April 21, 2019 10:09
Display marker on Google Maps (Kotlin)
import android.Manifest
import android.content.Context
import android.location.Location
import android.os.Build
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v4.app.ActivityCompat
import android.widget.Toast
import com.google.android.gms.maps.CameraUpdateFactory
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
public class ScanActivity extends AppCompatActivity {
import React, { Component } from 'react';
import './App.css';
let lastScrollY = 0;
class StickyBar extends Component {
render(){
return (
<div>
<button type="button">Button 1</button>
@anta40
anta40 / sticky.html
Created July 12, 2018 03:10
Sticky bar demo
<!DOCTYPE html>
<html>
<head>
<script src="jquery-3.3.1.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
font-family: Arial;
<!DOCTYPE html>
<html>
<head>
<script src="jquery-3.3.1.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
font-family: Arial;
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import { StickyContainer, Sticky } from 'react-sticky';
class App extends React.Component {
render() {
return (
<StickyContainer>
{/* Other elements can be in between `StickyContainer` and `Sticky`,
# Configuration file for the Nim Compiler.
# (c) 2017 Andreas Rumpf
# Feel free to edit the default values as you need.
# You may set environment variables with
# @putenv "key" "val"
# Environment variables can be accessed like so:
# gcc.path %= "$CC_PATH"