Skip to content

Instantly share code, notes, and snippets.

View karthikraj-duraisamy's full-sized avatar

Karthikraj Duraisamy karthikraj-duraisamy

View GitHub Profile
{
"records":
[
{
"id": "1",
"name": "Yuvraj Singh",
"image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Yuvraj_Singh_appointed_as_Ulysse_Nardin_watch_brand_ambassador.jpeg/220px-Yuvraj_Singh_appointed_as_Ulysse_Nardin_watch_brand_ambassador.jpeg",
"total_score": "8804",
@karthikraj-duraisamy
karthikraj-duraisamy / InternetUtils.java
Created October 27, 2017 18:34
This class is useful to perform connection availability check in Android applications.
import android.Manifest;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.annotation.RequiresPermission;
public class InternetUtils {
private static ConnectivityManager connectivityManager;
@karthikraj-duraisamy
karthikraj-duraisamy / feeds.opml
Created December 18, 2017 10:41 — forked from stebennett/feeds.opml
The feeds I currently subscribe to.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Stephen subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Companies" title="Companies">
<outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/>
<outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/>
@karthikraj-duraisamy
karthikraj-duraisamy / AppBaseActivity.java
Created March 25, 2018 11:05
Android: Easiest way to reuse a common Navigation drawer among a group of activities.
/*
* This is a simple and easy approach to reuse the same
* navigation drawer on your other activities. Just create
* a base layout that conains a DrawerLayout, the
* navigation drawer and a FrameLayout to hold your
* content view. All you have to do is to extend your
* activities from this class to set that navigation
* drawer. Happy hacking :)
* P.S: You don't need to declare this Activity in the
* AndroidManifest.xml. This is just a base class.
@karthikraj-duraisamy
karthikraj-duraisamy / html-forms-manager.html
Created March 28, 2018 10:31
This is a sample file for pre populating, reading and validating inside html using javascript
<!DOCTYPE html>
<html>
<body>
<form id="myForm" action="/action_page.php">
First name: <input type="text" name="fname" value="Donald"><br>
Last name: <input type="text" name="lname" value="Duck"><br>
<input type="submit" value="Submit">
</form>
@karthikraj-duraisamy
karthikraj-duraisamy / introrx.md
Created July 21, 2018 14:05 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

Creating and Running MongoDB in AWS EC2 (Self Managed MongoDB Servers)

Note: At the time of writing this, I have used MongoDB v4.2

Steps involved:

  • Create and run MongoDB in EC2 Instance with Basic Config
  • Making EC2 proper for MongoDB Database
  • Adding Replicas
----
To Remove a package from node-modules
----
npm uninstall <package-name>
--------------------
----