Skip to content

Instantly share code, notes, and snippets.

View alexpaul's full-sized avatar
:octocat:

Alex Paul alexpaul

:octocat:
View GitHub Profile
@alexpaul
alexpaul / MongoDB-Key-Paths.md
Last active November 27, 2021 02:02
Key Locations of MongoDB paths on mac.
// config file
systemLog:
  destination: file
  path: /usr/local/var/log/mongodb/mongo.log
  logAppend: true
storage:
  dbPath: /usr/local/var/mongodb
net:
  bindIp: 127.0.0.1
@alexpaul
alexpaul / subway-stops.json
Created November 11, 2021 22:47
Subway Stops - JSON
{
"00ac": {
"id": "00ac",
"location": [
40.829521,
-73.874516
],
"name": "Morrison Av- Sound View",
"stops": {
"610": [
@alexpaul
alexpaul / Remove-Backlash-JavaScript.md
Last active October 14, 2021 19:02
Removing backlash characters from a String in JavaScript.
const str = `{\"hitPaywall\":false,\"counted\":false}`

const newStr = str.replaceAll('\\', '')

console.log(newStr) // {"hitPaywall":false,"counted":false}

HackerRank Questions

1. Mini-max Problem

HackerRank - Mini-max Problem

func miniMaxSum(arr: [Int]) -> Void {
    // Write your code here
    guard arr.count > 4 else { return }
@alexpaul
alexpaul / Hide-Navigation-Bar-Border.swift
Created August 2, 2021 21:22
Hide navigationbar border
extension UINavigationController {
func hideHairline() {
if let hairline = findHairlineImageViewUnder(navigationBar) {
hairline.isHidden = true
}
}
func restoreHairline() {
if let hairline = findHairlineImageViewUnder(navigationBar) {
hairline.isHidden = false
}
@alexpaul
alexpaul / Swift-Language-Primer.md
Created May 20, 2021 18:44
Swift Language Primer

Swift Language Primer

Types and Variables

Swift is a compiled, strongly-typed language. The compiler uses type inference to identify the type of an object, or you can explicitly use type annotation.

Type Inference

var favoritePeanut = "Charlie Brown" // String
@alexpaul
alexpaul / HackerRank-Questions.md
Last active July 28, 2023 05:34
HackerRank Practice Questions

HackerRank Questions / Solutions

Swift Solution

// https://www.hackerrank.com/challenges/missing-numbers/problem

DSA Assessment

Quesion 1

Print Elements in a Linked List

HackerRank