Skip to content

Instantly share code, notes, and snippets.

View SureshCS-50's full-sized avatar

Sureshkumar SureshCS-50

View GitHub Profile
@SureshCS-50
SureshCS-50 / Index.js
Created September 25, 2017 06:26 — forked from fabriciovergara/Index.js
React-Navigation AuthFlow with Saga
import React from 'react'
import { connect } from 'react-redux'
import { redirect as redirectAction } from 'src/redux/auth/action';
class Index extends React.Component {
static propTypes = {
redirect: React.PropTypes.func.isRequired,
};
@SureshCS-50
SureshCS-50 / yosemite-subl
Created August 19, 2017 10:25 — forked from jadaradix/yosemite-subl
Fix Sublime's "subl" command on OS X Yosemite.
rm /usr/local/bin/subl;
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl;
@SureshCS-50
SureshCS-50 / DpToPxAndPxToDp
Created June 22, 2017 11:28 — forked from laaptu/DpToPxAndPxToDp
Android convert dp to px and vice versa
public static float convertPixelsToDp(float px){
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
float dp = px / (metrics.densityDpi / 160f);
return Math.round(dp);
}
public static float convertDpToPixel(float dp){
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
float px = dp * (metrics.densityDpi / 160f);
return Math.round(px);
@SureshCS-50
SureshCS-50 / SlidingTabLayout.java
Last active May 21, 2018 19:00
SlidingTabLayout with both ImageView and TextView support.
/*
/**
* Created by Windows on 16-01-2015.
*/
/*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at