Skip to content

Instantly share code, notes, and snippets.

View nitinreddy3's full-sized avatar
🏠
Working from home

Nitin Reddy nitinreddy3

🏠
Working from home
View GitHub Profile
@nitinreddy3
nitinreddy3 / filterArray.js
Last active August 24, 2017 08:55
Get a 'n' number of elements from an array
/**
* Filters out first 'n' elements from the list
*/
/**
* Represents a array
*/
var list = [ 1, 2, 3, 4, 5, 6, 7, 6, 3, 4, 5, 12, 123, 2, 2, 23, 4, 5, 67, 4, 2, 34, 23, 34, 5, 45];
@nitinreddy3
nitinreddy3 / jenikns_ci_on_ubuntu.md
Created February 4, 2017 19:02 — forked from ostinelli/jenkins_ci_on_ubuntu.md
Setup Jenkins CI on Ubuntu.

Jenkins CI

Instructions on how to setup a secured Jenkins CI.

Install Jenkins

$ wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list$ .d/jenkins.list'
$ sudo apt-get update
$ sudo apt-get install jenkins
@nitinreddy3
nitinreddy3 / js
Last active October 20, 2016 01:44
Nested Array reduction to Array
/**
Array: [1, [2, 3], 4]
Flattens nested arrays
**/
var nestedArray = [1, [2, 3], 4, [5, 6, 7]];
nestedArray.reduce(function(a, b) {
return a.concat(b)
}, []);
@nitinreddy3
nitinreddy3 / introrx.md
Last active September 9, 2015 01:49 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@nitinreddy3
nitinreddy3 / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console