Skip to content

Instantly share code, notes, and snippets.

View uraniumreza's full-sized avatar
🎯
Focusing

Nayeem Reza uraniumreza

🎯
Focusing
  • EMBL
  • Heidelberg, Germany
  • 00:47 (UTC +02:00)
  • X @uraniumreza
View GitHub Profile
// Sample data for places and their distances
const places = [
{ name: 'Place A', distance: { 'Place B': 10, 'Place C': 5 } },
{ name: 'Place B', distance: { 'Place A': 10, 'Place C': 2 } },
{ name: 'Place C', distance: { 'Place A': 5, 'Place B': 2, 'Place D': 6 } },
{ name: 'Place D', distance: { 'Place C': 6 } },
];
// Create a graph by connecting places with edges
const graph = new Map();
import React, { Component } from 'react';
import { Text } from 'react-native';
import RNAndroidLocationEnabler from 'react-native-android-location-enabler';
class App extends Component {
componentDidMount() {
this.checkIfLocationEnabled();
}
checkIfLocationEnabled = () => {
# git bisect run <cmd> …
$ git bisect run node bisect/index.js
aa91d493c90a854b78a02fb10b8c097f323b9d4a is the first bad commit
commit aa91d493c90a854b78a02fb10b8c097f323b9d4a
Author: uraniumreza <reza.uranium@gmail.com>
Date: Sun May 10 19:37:40 2020 +0600
1.1.0
src/helper/validation.js | 9 +++
src/landing/components/ContactUs.js | 52 +++++++++++++ - -
src/landing/service/api.js | 12 +++
Bisecting: 2 revisions left to test after this (roughly 1 step)
[aa91d493c90a854b78a02fb10b8c097f323b9d4a] 1.1.0
Bisecting: 4 revisions left to test after this (roughly 2 steps)
[88f2ada15e8b2890b618e0300134deff9e4050c6] Add typography fixes
$ git bisect good
Bisecting: 4 revisions left to test after this (roughly 2 steps)
[88f2ada15e8b2890b618e0300134deff9e4050c6] Add typography fixes
$ git bisect start
$ git bisect good 5908ecf
$ git bisect bad 8c054db
# If that version works correctly, type
$ git bisect good
# If that version is broken, type
$ git bisect bad
# Then git bisect will respond with something like
Bisecting: 12 revisions left to test after this (roughly 4 steps)
# startup git bisect
$ git bisect start
# give git a commit where there is not a bug
$ git bisect good <commit-hash>
# give git a commit where there is a bug
$ git bisect bad <commit-hash>
Bisecting: X revisions left to test after this (roughly Y steps)