Skip to content

Instantly share code, notes, and snippets.

View rahulraghavankklm's full-sized avatar
🎯
Focusing

Rahul Raghavan rahulraghavankklm

🎯
Focusing
View GitHub Profile
@rahulraghavankklm
rahulraghavankklm / Postman.desktop
Created January 6, 2018 05:16 — forked from aviskase/Postman.desktop
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@rahulraghavankklm
rahulraghavankklm / MaterialReactSelect.js
Created December 21, 2017 17:12
react-select overrides for a material-ui@next feel
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Async } from 'react-select';
// UI.
import { withStyles } from 'material-ui/styles';
import { FormControl } from 'material-ui/Form';
import { InputLabel } from 'material-ui/Input';
@rahulraghavankklm
rahulraghavankklm / sets.js
Created November 17, 2017 16:27 — forked from clohr/sets.js
ES6 Sets: Intersection, Difference, and Union
const a = new Set([1, 2, 3, 4, 4, 4])
const b = new Set([3, 4, 5, 6])
const intersect = (set1, set2) => [...set1].filter(num => set2.has(num))
const differ = (set1, set2) => [...set1].filter(num => !set2.has(num))
const joinSet = (set1, set2) => [...set1, ...set2]
const myIntersectedSet = new Set(intersect(a, b))
console.log('myIntersectedSet', myIntersectedSet)
import { createAction } from 'redux-actions';
import * as WebUtils from '../webUtils/index';
import {
SELECT_MEAL,
UPDATE_MEAL_PROP,
BEGIN_CREATING_MEAL,
SUCCESS_CREATING_MEAL,
ERROR_CREATING_MEAL,
BEGIN_LOADING_MEALS,
@rahulraghavankklm
rahulraghavankklm / Makefile
Created October 12, 2017 17:57 — forked from h4cc/Makefile
Ubuntu 17.04 Zesty Zapus - Basic packages i usually install
#
# Ubuntu 17.04 (Zesty Zapus)
#
# Basic packages i usually install.
#
# Author: Julius Beckmann <github@h4cc.de>
#
# Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b
# Upgraded Script from 14.04: https://gist.github.com/h4cc/7be7f940325614dc59fb
@rahulraghavankklm
rahulraghavankklm / gh-pages-deploy.md
Created September 28, 2017 07:22 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@rahulraghavankklm
rahulraghavankklm / node-pdf-generator.js
Created August 30, 2017 16:39 — forked from adamgibbons/node-pdf-generator.js
Display or download PDF from node.js server
var restify = require('restify')
, port = process.env.PORT || 3000
, Phantom = require('phantom')
, tmpdir = require('os').tmpdir()
, fs = require('fs');
var server = restify.createServer();
function setResponseHeaders(res, filename) {
res.header('Content-disposition', 'inline; filename=' + filename);
@rahulraghavankklm
rahulraghavankklm / App.js
Created May 20, 2017 10:36 — forked from fdidron/App.js
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}