Skip to content

Instantly share code, notes, and snippets.

Avatar
🇮🇩
Write program that can work well with other programs

inovramadani

🇮🇩
Write program that can work well with other programs
  • indonesia
View GitHub Profile
@inovramadani
inovramadani / branch-squash-commits.md
Last active Mar 19, 2019
How to squash commits on git branch
View branch-squash-commits.md

How to squash commits on git branch

When submitting a pull request, it's important that you squash your commits to keep our repository concise and clean.

You will need to use VIM to do this.

Make sure your branch is up to date with the master branch.

  • Run git rebase -i master.
  • VIM will be opened
@inovramadani
inovramadani / mathCalculation.js
Created Jan 31, 2019
Javascript recursive function to do math calculation on string formula input
View mathCalculation.js
// recursive function to do math calculation on string formula input
// use case: mathCalculation("1 * 2 + 4 / 2 - 6")
function mathCalculation (formula) {
const plusOperator = '+'
const minusOperator = '-'
const multiplyOperator = '*'
const divideOperator = '/'
if (formula.indexOf(plusOperator) > 0) {
@inovramadani
inovramadani / codility_solution.txt
Last active Jan 3, 2021
Solution to programming problems in Codility (Javascript)
View codility_solution.txt
Lesson 1 - Iterations
BinaryGap: https://app.codility.com/demo/results/trainingMNDHQN-2SY/
Lesson 2 - Array
CyclicRotation: https://app.codility.com/demo/results/training672XDD-B8R/
OddOccurrencesInArray: https://app.codility.com/demo/results/trainingKHZYEY-RR6/
Lesson 3 - Time Complexity
FrogJmp: https://app.codility.com/demo/results/training6JSR59-MEM/
PermMissingElem: https://app.codility.com/demo/results/trainingBFETZ2-2GY/