Skip to content

Instantly share code, notes, and snippets.

Devarajan Narayanan dvrajan

Block or report user

Report or block dvrajan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dvrajan
dvrajan / index.js
Created Mar 18, 2018
Blogpost sample index.js
View index.js
import React from 'react';
import {AppRegistry} from 'react-native';
import router from './Router'
class Index extends React.Component {
render() {
return router.route(this.props.key, this.props.data)
}
}
@dvrajan
dvrajan / Router.js
Created Mar 18, 2018
Blogpost sample Router.js
View Router.js
import React from 'react'
import Component1 from "./components/Component1";
import Component2 from "./components/Component2";
class Router {
constructor(registry = {}) {
this._registry = registry;
}
route(routingKey, props) {
@dvrajan
dvrajan / ReactScreen.java
Last active Mar 18, 2018
Blogpost example ReactScreen
View ReactScreen.java
public class ReactScreen extends Activity implements DefaultHardwareBackBtnHandler {
protected ReactInstanceManager reactInstanceManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
reactInstanceManager = ReactInstanceManager.builder()
.setApplication(this.getApplication())
View Css FizzBuzz
<html>
<head>
<style>
body{
counter-reset: n;
}
div:before {
counter-increment: n;
content: counter(n);
View Minesweeper
There is a mine grid of size mxn and the mine positions are known by the system. Now, Given a coordinate display the mine grid. If a mine is hit, End the game else continue the game until all the cells are opened.
Input => 3 3 // mine of size 3 x 3
Input => 12 23 33 // mines are at (1,2) (2,3) (3,3)
Output => x x x
x x x
x x x
Input => 1,1
Output => o x x
View Github issue exporter
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
You can’t perform that action at this time.