- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo nano ~/.bash_profile
- Add
export PATH=/path/to/depot_tools:"$PATH"
(it's important that depot_tools comes first here)
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
build: | |
go build -o bin/main main.go | |
dev: | |
CompileDaemon \ | |
-build="make build" \ | |
-include=Makefile \ | |
-exclude-dir=.git \ | |
-directory=. \ | |
-color=true \ |
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 express = require('express') | |
const ilog = require('ilog') | |
const debug = require('debug')('debug') | |
const axios = require('axios') | |
const app = express() | |
app.get("/", async (req,res,next) => { | |
try { | |
const {data} = await axios.get('http://jsonplaceholder.typicode.com/users/1') | |
debug(res.headersSent) |
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
/** | |
* arr [5,4,3,2,1,7] length: 6 mid: 2 | |
* [5,4,3] [2,1,7] | |
* [5] [4,3] [2] [1,7] | |
* [4] [3] [1] [7] | |
*/ | |
function mergeSort(arr: number[], startIndex: number, endIndex: number): number[] { | |
if (endIndex <= startIndex) return [arr[startIndex]]; | |
const mid = Math.floor((startIndex + endIndex) / 2); |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
c1 := make(chan string) | |
c2 := make(chan string) |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
func main() { |
-
Installation: 1- Explain how Go path works? 2- What are the benefits of Go Module (reference its commands)?
-
Concurrency: 1- Explain Concurrency & when to use it? 2- How would you allow communication between goroutines in Go? 3- How would you manage their access to resources?
- why do you use Go (my answer was as simple as "why i shouldn't", and some extra points Grimacing face)