Spring Boot login programmatically
Important:
First you need a custom password encoder for your spring boot project, so you can log in using your user credentials. READ HERE - custom password encoder for spring boot.
Setup Spring Security
Expose context of org.springframework.security.authentication.AuthenticationManager from security config class to be used in LoginController
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org ...
how to setup local site domain vhost xampp windows 2024
How to setup vhost config on xampp for local site domain, support for multiple local site.
Setup hosts
127.0.0.1 localhost
127.0.0.1 mysite-dev.com
127.0.0.1 anothersite-dev.com
Setup httpd-vhost.conf
<VirtualHost *:80>
DocumentRoot C:/xampp/htdocs/
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName mysite-dev.com # domain name
DocumentRoot "D:/Workspaces/PHP/ISP"
<Directory "D:/Workspaces/PHP/ISP">
Opti ...
Quiz The Legend Of Neverland
when this page errors you can try Quiz the legend of neverland questions and answers beta version
Scenic Quiz Answer The Legend Of Neverlands
Filter
Only Show (O)
Quiz The Legend Of Neverland Last updated 2023-09-07T12:54:03+07:00 changelog
"Barge Haulers on the Volga" once shocked the world of arts, the creator of this painting is Gerasimov (X)
"Barge Haulers on the Volga" once shocked the worl ...
build.gradle with custom repository
Fix missing dependencies from your gradle project (android, maven, etc) with this build.gradle.
insert into YOUR_PROJECT_GRADLE/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url "https://maven.google.com" }
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://dl.bintray.com/android/and ...
Tether VPN Android
How to tethering vpn on android
ROOT is required
Requirement
Terminal Emulator
Tutorial
Start your VPN until connected
Open terminal emulator and input below commands
su
ip link show
id
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -l FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule del from 192.168.43.0/24 lookup 61
ip route del default dev tun0 scope link table 61
ip route del 192.168.43.0/24 dev wlan0 scope link table 61
ip route b ...
Kill gradle daemon process
Windows
Using WMIC
kill gradle processes using WMIC
WMIC PROCESS where "Name like 'java%' AND CommandLine like '%GradleDaemon%'" Call Terminate
WMIC PROCESS where "Name like 'java%' AND CommandLine like '%kotlin%'" Call Terminate
WMIC PROCESS where "Name like 'java%' AND CommandLine like '%java%'" Call Terminate
in batch file remove percent symbol %
call wmic process where "name like 'java.exe&#x ...
android webview get content height
Basic methods
Basic methods of Various ways to get the height of a Webview on Android. Nothing really works on all cases
import android.view.ViewTreeObserver
import android.webkit.JavascriptInterface
import android.webkit.WebView
import android.webkit.WebViewClient
// Try 1
private fun getHeightFromDocumentBodyScrollHeight(webView: WebView, setHeight: (Int)->Unit) {
webView.webViewClient = object : WebViewClient() {
override fun onPageFinished(view: WebView?, url: Stri ...
Geckoview cangoback equivalent of android webview.canGoBack
How can i use canGoBack() on GeckoView?
below is sample default android webview canGoBack() implemention
public void onBackPressed() {
if (webView.canGoBack()) {
webView.goBack();
} else {
super.onBackPressed();
}
}
on geckoview
You need to set a navigation delegate on the gecko session and use a global boolean to keep track of whether it can go back or not.
Java
private boolean canGoBack = false;
public class MainActivity extends AppCo ...
List referrer of original traffic from android
list original traffic referrer from android (parsed with regex (android-app:[\w\/\.]+))
android-app://arun.com.chromer
android-app://com.andrewshu.android.reddit
android-app://com.andrewshu.android.redditdonation
android-app://com.android.chrome
android-app://com.google.android.apps.genie.geniewidget
android-app://com.google.android.apps.plus/https/plus.url.google.com/mobileapp
android-app://com.google.android.apps.social.spaces
android-app://com.google.android.googlequicksearchbox
android-app:/ ...
What does google-services.json really do?
What is this file really for
google-services.json contains developer credentials and configuration settings, which is needed to verify while connecting with GoogleApiClient. Though your service is working fine with your test device as it is detecting your developer account but after releasing your app in public, it will not work without the json file. So don’t delete it.
The Official Documentation says:
The application builds a GoogleApiClient, specifying which scopes and APIs the application wi ...