Skip to content

Instantly share code, notes, and snippets.

View johnmusiu's full-sized avatar
:octocat:
Coffee + Time = Code

John Musiu johnmusiu

:octocat:
Coffee + Time = Code
  • Nairobi, Kenya
  • 00:38 (UTC +03:00)
View GitHub Profile
import java.util.Arrays;
public class QuickSort {
public static void main(String[] args) {
int [] input = new int[]{ 10, 4, 5, 6, 12, 8, 34};
QuickSort quickSort = new QuickSort();
quickSort.quicksort(input, 0, 6);
System.out.println(Arrays.toString(input));
}
@johnmusiu
johnmusiu / libv8.MD
Created June 3, 2019 15:17
Resolve libv8 gem install issues

Current OS MacOS Mojave version 10.14.5, Rails version: 5.1.7, Ruby version: 2.3.3

Command ran gem install libv8 -v '3.16.14.3 threw the following error

  gem install libv8 -v '3.16.14.13'                    
Building native extensions. This could take a while...
ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

 current directory: /Users/johnmusiu/.rvm/gems/ruby-2.3.3@firepoint/gems/libv8-3.16.14.13/ext/libv8

Merge conflicts

Happens when working on a team project when two/more developers have edited the same file.
Therefore, face the conflict courageously.

Assumption: current_branch(local branch) conflicts with a base branch called base-branch

Solving a merge conflict by rebasing

  1. git pull origin --rebase base-branch. If merge conflicts persist:
  2. Fix merge conflicts by accepting either current changes, incoming changes or Accept both changes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@johnmusiu
johnmusiu / Makefile
Created March 1, 2018 19:38 — forked from h4cc/Makefile
Ubuntu 16.04 LTS Xenial Xerus - Basic packages i usually install
#
# Ubuntu 16.06 LTS (Xenial Xerus)
#
# Basic packages i usually install.
#
# Author: Julius Beckmann <github@h4cc.de>
#
# Upgraded Script from 14.04: https://gist.github.com/h4cc/7be7f940325614dc59fb
#