Skip to content

Instantly share code, notes, and snippets.

View sandho's full-sized avatar

Santhoshkumar R sandho

View GitHub Profile
@sandho
sandho / free-database-hosting.md
Created April 13, 2024 22:28 — forked from bmaupin/free-database-hosting.md
Free database hosting
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.AppCompatButton
import androidx.lifecycle.Observer
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jetpackcompose">
<uses-permission
android:name="android.permission.INTERNET"
/>
<application
android:allowBackup="true"
package com.jetpackcompose
import android.os.Bundle
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.Composable
import androidx.compose.ui.viewinterop.AndroidView
package com.jetpackcompseapp
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
package com.jetpackcompose
import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.Button
import androidx.compose.material.Text
@sandho
sandho / php_comma_separated_values_to_array_then_merge_and uniques_values.php
Created December 20, 2021 17:40
Comma separted to array, multiple comma separated to single array, get uniques values from array php
<?php
// example code
$string = "test1, test2";
$string2 = "test1, test";
$str_arr = explode (",", $string);
$str_arr2 = explode (",", $string2);
@sandho
sandho / encrypt_decrypt_bcrypt.php
Created June 21, 2020 05:34
encrypt_decrypt_bcrypt
<?php
// encrypt
$password = ""; // your password here
$options = [
'cost' => 12,
];
@sandho
sandho / gist:7dc02f9d8756be4604e3bf44b736ec8b
Created February 21, 2020 16:41 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array