Skip to content

Instantly share code, notes, and snippets.

View naveenrobo's full-sized avatar
👋

Naveen Sakthivel naveenrobo

👋
View GitHub Profile
echo "123"
@naveenrobo
naveenrobo / index.html
Created March 2, 2024 06:20
Sample HTML file for loading existing site
<html>
<head>
<meta charset="utf-8">
<title>The RMF Site Editor</title>
<style>
body {
background-color: #101010;
margin: 0;
padding: 0;
@naveenrobo
naveenrobo / presigned.py
Created August 19, 2023 08:51
Generate S3 persigned url
import boto3
from botocore.client import Config
from flask import Flask, request, jsonify
app = Flask(__name__)
AWS_ACCESS_KEY = ""
AWS_SECRET_KEY = ""
BUCKET_NAME = ""
@naveenrobo
naveenrobo / client.cs
Created August 8, 2022 17:10
Send file from TCP Client to TCP Server in C#
using System;
using System.IO;
using System.Net.Sockets;
namespace SlingshotTcpClient
{
class Program
{
static void Main(string[] args)
{
.bg
canvas#hero-lightpass
#container
h1 AirPods Pro
.container-hero
div.h1 Active Noise Cancellation for immersive sound.
div.h1 Transparency mode for hearing what’s happening around you.
div.h1 A customizable fit for all-day comfort.
div.h1 Magic like you’ve never heard.
package dev.dotworld.mdm.ui.videocall
import android.annotation.TargetApi
import android.content.Context
import android.graphics.ImageFormat
import android.hardware.camera2.CameraCharacteristics
import android.hardware.camera2.CameraManager
import android.hardware.camera2.CameraMetadata
import android.os.Build
import android.util.Log
import android.annotation.TargetApi
import android.content.Context
import android.graphics.ImageFormat
import android.hardware.Camera
import android.hardware.camera2.CameraCharacteristics
import android.hardware.camera2.CameraManager
import android.hardware.camera2.CameraMetadata
import android.os.Build
import android.util.Log
import com.twilio.video.Camera2Capturer
const val TAG = "Util"
class Util {
private fun lensOrientationString(value: Int) = when (value) {
CameraCharacteristics.LENS_FACING_BACK -> CameraFacing.BACK
CameraCharacteristics.LENS_FACING_FRONT -> CameraFacing.FRONT
CameraCharacteristics.LENS_FACING_EXTERNAL -> CameraFacing.EXTERNAL
else -> CameraFacing.UNKNOWN
}
@naveenrobo
naveenrobo / border-gradient.xml
Created December 9, 2021 12:47
Android gradient drawable for alert screens...
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- left shadow -->
<item>
<shape android:shape="rectangle">
<gradient
android:angle="180"
android:centerColor="#00FF0000"
android:centerY="0.05"
android:endColor="#00FF0000"
@naveenrobo
naveenrobo / main.go
Created November 22, 2021 07:29
building ngrok for android
// add this at top level of Main function
// src/ngrok/client/main.go
// net/http has some DNS issue. It can be resolved by changing the default resolver
func Main() {
var dialer net.Dialer
net.DefaultResolver = &net.Resolver{
PreferGo: false,
Dial: func(context context.Context, network, _ string) (net.Conn, error) {
conn, err := dialer.DialContext(context, network, "8.8.8.8:53")
if err != nil {