Skip to content

Instantly share code, notes, and snippets.

View yokesharun's full-sized avatar
😬
Happy

Arun Yokesh yokesharun

😬
Happy
View GitHub Profile
@yokesharun
yokesharun / find_distance.php
Last active March 20, 2017 09:57
Find the Distance between two latitude and longitude points
function haversineGreatCircleDistance(
$latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000)
{
// convert from degrees to radians
$latFrom = deg2rad($latitudeFrom);
$lonFrom = deg2rad($longitudeFrom);
$latTo = deg2rad($latitudeTo);
$lonTo = deg2rad($longitudeTo);
$latDelta = $latTo - $latFrom;
@yokesharun
yokesharun / Blockstack.txt
Created December 6, 2017 06:57
Blockstack ID
Verifying my Blockstack ID is secured with the address 1F2BFT4XPMyUJ4wzNNnk2717a3nVZQch32 https://explorer.blockstack.org/address/1F2BFT4XPMyUJ4wzNNnk2717a3nVZQch32
@yokesharun
yokesharun / React-Parent-Child-Component.js
Last active February 15, 2019 14:53
A Simple Example of React Parent - Child Component
import React, { Component } from 'react';
Class ParentComponent extends Component{
this.state = {
title: "CodeFights",
description: "Online website"
}
constructor(props){
super(props);
}
@yokesharun
yokesharun / React-State-Props-Manipulation.js
Created July 6, 2018 17:14
React State and props Initialisation and manupulation
// Define a state
this.state = {
name: "Jon Snow",
age: 28
}
// get value of the state
this.state.name
@yokesharun
yokesharun / LED_tower.ino
Created June 10, 2019 14:19
Arduino LED Tower Code
#include <FastLED.h>
/** BASIC CONFIGURATION **/
//The amount of LEDs in the setup
#define NUM_LEDS 200
//The pin that controls the LEDs
#define LED_PIN 6
//The pin that we read sensor values form
#define ANALOG_READ 2