Skip to content

Instantly share code, notes, and snippets.

vuhung3990 / degrees2meters.js
Created August 3, 2021 00:34 — forked from onderaltintas/degrees2meters.js
javascript coordinate conversions between 900913(3857) - 4326(lat lon)
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
lon= -77.035974
lat = 38.898717
vuhung3990 / rank.json
Last active September 29, 2019 04:48
"last_update": "2019/09/29 12:00:17",
"data": [
"index": 1,
"flag": "vn",
"city": "Ha Noi",
"nation": "Viet Nam",
"aqi": 180

Keybase proof

I hereby claim:

  • I am vuhung3990 on github.
  • I am petertux ( on keybase.
  • I have a public key ASDIoJzOCbmTyRCKu6UlZ5leJZj9mM9n4ww8V-_FUw5vYwo

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="">
<title>MobileLiveChat: Activity</title>
<link rel="self" href=""/>
<link rel="alternate" href=""/>
vuhung3990 / .editorconfig
Created September 20, 2018 13:41
EditorConfig for android project (2 space style)
# EditorConfig is awesome:
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Privacy Policy</title> <style>body{font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding:1em;}</style></head> <body><h2>Privacy Policy</h2> <p> built the Chuyển đổi 11 số sang 10 số các mạng app as a Free app. This SERVICE is provided by at no cost and is intended for use as is.
</p> <p>This page is used to inform visitors regarding my policies with the collection, use, and
disclosure of Personal Information if anyone decided to use my Service.
</p> <p>If you choose to use my Service, then you agree to the collection and use of information in relation
to this policy. The Personal Information that I collect is used for providing and improving the
Service. I will not use or share your information with anyone except as described
in this Privacy Policy.
vuhung3990 /
Created June 20, 2017 10:46
test intent
public class MainActivityTest {
public IntentsTestRule<MainActivity> rule = new IntentsTestRule<MainActivity>(MainActivity.class);
public void openExport_shouldPass() throws Exception {
vuhung3990 /
Last active August 1, 2019 08:05
simple image slider for android
public class ImageSliderAdapter extends FragmentPagerAdapter {
private final List<Fragment> fragmentList = new ArrayList<>();
public ImageSliderAdapter(@NonNull FragmentManager fm) {
public Fragment getItem(int position) {
return fragmentList.get(position);
vuhung3990 /
Last active March 7, 2017 12:18
- espresso pull to refresh and load more basic - RecyclerViewActions: androidTestCompile("$espressoVersion") { // Necessary to avoid version conflicts exclude group: '', module: 'appcompat' exclude group: '', module: 'support-v4' exclude group: '…
package com.dev22.dealhunter;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static;
vuhung3990 /
Last active August 14, 2017 06:57
recycleview load more helper
* Created by dev22 on 3/1/17.
* helper class for detect when recyclerView scroll to bottom and load more data
public abstract class DetectScrollToEnd extends RecyclerView.OnScrollListener {
private final LinearLayoutManager layoutManager;
private final int mThreshold;