Skip to content

Instantly share code, notes, and snippets.

View aditya2337's full-sized avatar
🎯
Focusing

Aditya aditya2337

🎯
Focusing
View GitHub Profile
@aditya2337
aditya2337 / aditya.md
Created October 1, 2016 16:26
HackerEarth Gist

Store details fetched from API to Localstorage / WebSQL (JSON response).

@aditya2337
aditya2337 / MarsCurrency.js
Last active March 15, 2017 06:29
Tip at Mars
function giveTip(currencyFirst, currencySecond, sum){
let arr = [];
arr[0] = 0;
for(let i = 1; i <= sum; i++){
let minA, minB;
if( i < currencyFirst){
minA = currencyFirst - i;
}else{
minA = arr[i - currencyFirst];
}
import React, { Component } from 'react';
import { connect } from 'react-redux';
import config from '../config/config';
import actions from '../redux/actions';
import ReactDOM from 'react-dom';
import Sources from '../config/sources';
@connect((state) => state)
export default class MainChart extends Component {
@aditya2337
aditya2337 / Rubix.js
Created May 4, 2017 08:18
Rubix first chart
import React, { Component } from 'react';
import { connect } from 'react-redux';
import config from '../config/config';
import actions from '../redux/actions';
import ReactDOM from 'react-dom';
import Sources from '../config/sources';
@connect((state) => state)
export default class MainChart extends Component {
const Sources = {
gplus: {
name: 'Gplus',
color: 'rgb(170, 70, 67, 1)',
fillColor: 'rgb(170, 70, 67, 0.2)',
img: 'imgs/common/icons/gplus.png'
},
freehacks: {
name: 'Freehacks',
color: 'rgb(159, 21, 97, 1)',
import React, { Component } from 'react';
import Post from './Post';
import { connect } from 'react-redux';
import InfiniteScroll from 'react-infinite-scroller';
import CircularProgress from 'material-ui/CircularProgress';
import config from '../../config/config';
import actions from '../../redux/actions';
import React, {Component} from 'react';
import ReactTable from 'react-table';
import { Typeahead } from 'react-bootstrap-typeahead';
import Sources, { Categories } from '../config/sources';
import IconButton from 'material-ui/IconButton';
import DeleteForever from 'material-ui/svg-icons/action/delete-forever';
import Toggle from './SMTA/Toggle';
import moment from 'moment';
import config from '../config/config';
/* style for atom having both firacode and operetor mono */
atom-text-editor.editor {
font-family: "Operator Mono light";
text-rendering: optimizeLegibility;
font-size: 15px;
font-weight: 400;
line-height: 1.4;
atom-text-editor.editor .syntax--string.syntax--quoted,
{
// Place your settings in this file to overwrite the default settings
"atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"editor.renderWhitespace": "boundary",
"editor.rulers": [100],
"editor.cursorBlinking": "solid",
"workbench.iconTheme": "vscode-icons",
"editor.fontFamily": "Operator Mono light, 'Fira Code'",
gitstatus=`git status 2> /dev/null`
if [[ `echo $gitstatus | grep "Changes to be committed"` != "" ]]
then
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1***)/'
elif [[ `echo $gitstatus | grep "Changes not staged for commit"` != "" ]]
then
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1**)/'
elif [[ `echo $gitstatus | grep "Untracked"` != "" ]]
then
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1*)/'