Skip to content

Instantly share code, notes, and snippets.

View rana01645's full-sized avatar

Afjalur Rahman Rana rana01645

View GitHub Profile
@rana01645
rana01645 / selectdropdown.js
Created February 25, 2019 18:42
Get select dropdown by using jquery as json
var options = $('#proxy_country option');
var values = $.map(options ,function(option) {
return '{"name":"'+option.text+'","alpha2Code":"'+option.value+'"}';
});
JSON.stringify(values.join(','));
@rana01645
rana01645 / ViewPagerAdapter.java
Created February 27, 2019 14:00
View pager adapter
package com.trickbd.broadbandhack.adapter;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.PagerAdapter;
@rana01645
rana01645 / Ping.java
Created February 27, 2019 14:00
Java pinging
package com.trickbd.broadbandhack.App;
import android.os.AsyncTask;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
import java.net.UnknownHostException;
@rana01645
rana01645 / CustomViewPager.java
Created March 3, 2019 06:32
Swipe controlable viewpager
package com.trickbd.broadbandhack.ui.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import androidx.viewpager.widget.ViewPager;
/*
View pager with swipe control..
*/
package com.trickbd.broadbandhack.ui.widgets;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Patterns;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@rana01645
rana01645 / GoogleFonts.txt
Created July 28, 2019 06:58 — forked from karimnaaji/GoogleFonts.txt
Google fonts list (TTF)
{
"kind": "webfonts#webfontList",
"items": [
{
"kind": "webfonts#webfont",
"family": "ABeeZee",
"category": "sans-serif",
"variants": [
"regular",
"italic"
@rana01645
rana01645 / NativeTemplateStyle.java
Created August 6, 2019 12:27
Native Template Androidx Support
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@rana01645
rana01645 / TemplateView.java
Created August 6, 2019 12:42
Native Template Androidx support
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@rana01645
rana01645 / gnt_medium_template_view.xml
Created August 6, 2019 12:49
Native template androidx support
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.gms.ads.formats.UnifiedNativeAdView
android:id="@+id/native_ad_view"
android:layout_width="match_parent"
android:layout_height="350dp"
android:background="@drawable/gnt_outline_shape">
@rana01645
rana01645 / gnt_small_template_view.xml
Created August 6, 2019 12:51
Native template androidx support
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.gms.ads.formats.UnifiedNativeAdView
android:id="@+id/native_ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">