We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = reqiure("fs"); | |
(async () => { | |
let files = []; | |
let lineCount = 0; | |
const directoryPath = "."; | |
const fileType = "csv"; | |
try { | |
const fileNames = fs.readdirSync(directoryPath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from "fs"; | |
(async () => { | |
let files = []; | |
let lineCount = 0; | |
const directoryPath = "."; | |
const fileType = "csv"; | |
try { | |
const fileNames = fs.readdirSync(directoryPath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ___ __ __ ____ _ ____ _ | |
# / _ \| \/ |/ ___( )___ / ___| ___| |_ _ _ _ __ | |
# | | | | |\/| | | |// __| \___ \ / _ \ __| | | | '_ \ | |
# | |_| | | | | |___ \__ \ ___) | __/ |_| |_| | |_) | | |
# \___/|_| |_|\____| |___/ |____/ \___|\__|\__,_| .__/ | |
# |_| | |
echo "Creating an SSH key for you..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func binarySearch<T: Comparable> (on array: [T], target: T) -> Int?{ | |
if(array.count <= 1 && array.first != target){ | |
return nil | |
} | |
let middle = array.count/2 | |
if(target == array[middle]){ | |
return middle | |
}else if(target < array[middle]){ | |
return binarySearch(on: Array(array.dropLast(middle)), target: target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |