Skip to content

Instantly share code, notes, and snippets.

View rfprod's full-sized avatar
☯️

Vadim rfprod

☯️
View GitHub Profile
@rfprod
rfprod / JavascriptPseudorandomQuoteGen.markdown
Last active April 22, 2017 16:01
Preudorandom Quote Generator

Pseudorandom quote generator

Generator options: tweet generated quote.

A Pen by V on CodePen.

License.

Pomodoro timer

Timer options: start, pause, reset; change Session and Break duration values on the go.

A Pen by V on CodePen.

License.

Calculator

Supports mathematical operations chaining, e.g: 1+2*3/4=...

A Pen by V on CodePen.

License.

@rfprod
rfprod / ArabicToRomanNumeralCoverter.markdown
Last active April 22, 2017 16:01
Arabic to Roman Numeral Coverter

Arabic to Roman Numeral Converter

Converts the given number from arabic to roman numeral system.

A script by V.

License.

@rfprod
rfprod / WhereArtThou.markdown
Last active April 22, 2017 16:00
Where Art Thou

Where Art Thou

A function that looks through an array of objects (first argument) and returns an array of all objects that have matching property and value pairs (second argument). Each property and value pair of the source object has to be present in the object from the collection if it is to be included in the returned array. For example, if the first argument is [{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], and the second argument is { last: "Capulet" }, then function returns the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.

A script by V.

License.

@rfprod
rfprod / SearchAndReplace.markdown
Last active April 22, 2017 16:00
Search And Replace

Search And Replace

Performs a search and replace on the sentence using the arguments provided and returns the new sentence. First argument is the sentence to perform the search and replace on. Second argument is the word that you will be replacing (before). Third argument is what you will be replacing the second argument with (after). NOTE: Preserves the case of the original word when you are replacing it. For example if you mean to replace the word "Book" with the word "dog", it will be replaced as "Dog".

A script by V.

@rfprod
rfprod / PigLatin.markdown
Last active April 22, 2017 16:00
Pig Latin

Pig Latin

Translates the provided string to pig latin. Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an "ay". If a word begins with a vowel it justs add "way" to the end.

A script by V.

License.

@rfprod
rfprod / DNAPairing.markdown
Last active April 22, 2017 16:00
DNA Pairing

DNA Pairing

The DNA strand is missing the pairing element. Each character gets its pair, and returns to the results as a 2d array. Base pairs are a pair of AT and CG. For example, for the input GCG, return [["G", "C"], ["C","G"],["G", "C"]] The character and its pair are paired up in an array, and all the arrays are grouped into one encapsulating array.

A script by V.

@rfprod
rfprod / MissingLetters.markdown
Last active April 22, 2017 16:00
Missing Letters

Missing Letters

Finds the missing letter in the passed letter range and returns it. If all letters are present in the range, returns undefined.

A script by V.

License.

@rfprod
rfprod / SortedUnion.markdown
Last active April 22, 2017 15:59
Sorted Union

Sorted Union

Takes two or more arrays and returns a new array of unique values in the order of the original provided arrays. In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array. The unique numbers are sorted by their original order, but the final array is not sorted in numerical order.

A script by V.

License.