Skip to content

Instantly share code, notes, and snippets.

View rakesh1988's full-sized avatar
🏠
Working from home

Rakesh Kashyap rakesh1988

🏠
Working from home
View GitHub Profile
@rakesh1988
rakesh1988 / access-pi-anywhere.md
Created July 6, 2024 16:52 — forked from jc-torresp/access-pi-anywhere.md
Configuration to access Raspberry Pi from anywhere with UPnP port forwarding

Access Raspberry Pi from anywhere

Dynamic DNS

We need to use so called Dynamic DNS (DDNS) to create and dynamically update a mapping between a chosen domain name and an “external” IP address of our Raspberry Pi (i.e. router IP address).

  • Look for a DDNS provider.
  • Register a new user account.
  • Choose a desire domain name.
  • Configure it on router.
#!/bin/bash
# Check if BRANCH_NAME is provided
if [ -z "$1" ]; then
echo "Error: BRANCH_NAME is required."
exit 1
fi
# Variables
SYNC_DIRECTION="upload"
Open High Low Close Volume OI LTT Start_Time TotOI
15885 15898.85 15841.3 15850.8 241900 0 8/2/2021 9:15:58 AM 2021-08-02 09:15 9419800
15850.15 15860 15846.85 15860 121400 0 8/2/2021 9:16:59 AM 2021-08-02 09:16 9419800
15860.05 15869.4 15860.05 15868.05 86950 108300 8/2/2021 9:17:59 AM 2021-08-02 09:17 9528100
15868 15869.15 15862.2 15866.25 47900 0 8/2/2021 9:18:59 AM 2021-08-02 09:18 9528100
15865.15 15869.7 15864.55 15869.25 45200 0 8/2/2021 9:19:59 AM 2021-08-02 09:19 9528100
15868.8 15878.45 15867.45 15872.45 89750 54450 8/2/2021 9:20:58 AM 2021-08-02 09:20 9582550
15870.5 15877.8 15870.5 15873.1 48350 0 8/2/2021 9:21:59 AM 2021-08-02 09:21 9582550
15872.5 15874.9 15866.65 15866.65 39400 0 8/2/2021 9:22:59 AM 2021-08-02 09:22 9582550
15867.6 15867.6 15858.25 15866.05 44700 20850 8/2/2021 9:23:59 AM 2021-08-02 09:23 9603400
## Privacy Policy
Rakesh built the OU app as a Free app. This SERVICE is provided by Rakesh at no cost and is intended for use as is.
This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
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.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at OU unless otherwise defined in this Privacy Policy.
@rakesh1988
rakesh1988 / LocationTest.java
Created July 4, 2016 11:44
Get user location via fusedlocation API
package com.example.rakesh.navigation_example;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
@rakesh1988
rakesh1988 / debounce_sample.java
Last active May 3, 2016 13:19
debouncing retroit call
//i declare the subject globally
PublishSubject<Call<List<Response>>> subject = PublishSubject.create();
//this is how i call retrofit
private void updateMarkers(LatLng center)
{
subject.onNext(new APIHelper().
GetNearByLocations("auth_key", center.latitude, center.longitude, urgency));
subject.debounce(1, TimeUnit.SECONDS)
.observeOn(AndroidSchedulers.mainThread())
@rakesh1988
rakesh1988 / code chunk
Last active April 28, 2016 14:41
uploading image to uploads.im
ArrayList<ImageUploadResponse> responseArrayList = new ArrayList<>();
// call to upload the image
Observable.from(imageStorageList)
.flatMap(uri -> new ImageUploadHelper().uploadImage(new File(uri.getPath())))
.toList()
.map(list -> {
for (ImageUploadResponse response :
list
)
{