This file contains hidden or 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 add | |
import ( | |
"fmt" | |
"testing" | |
) | |
func TestAdd(t *testing.T) { | |
expected := 5 |
This file contains hidden or 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 add | |
func Add(a int, b int) int { | |
return a + b | |
} |
This file contains hidden or 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 ( | |
"encoding/json" | |
"fmt" | |
) | |
type City struct { | |
Population float64 `json:"population"` // population in millions | |
Name string `json:"name"` |
This file contains hidden or 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" | |
"sync" | |
) | |
func main() { | |
wg := new(sync.WaitGroup) //create a wait group |
This file contains hidden or 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" | |
"sync" | |
) | |
func main() { | |
wg := new(sync.WaitGroup) //create a wait group |
This file contains hidden or 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 ( | |
"context" | |
"fmt" | |
"golang.org/x/sync/errgroup" | |
) | |
func main() { |
This file contains hidden or 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" | |
) | |
func main() { | |
numberCh := make(chan int, 10) | |
This file contains hidden or 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 axios from 'axios'; | |
axios.interceptors.request.use( | |
function (config) { | |
let token = localStorage.getItem('access_token'); | |
if (token && token !== 'null') { | |
config.headers.common['Authorization'] = 'Bearer ' + token; | |
} | |
return config; |
This file contains hidden or 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
<?php | |
//dependencies | |
//"clue/buzz-react": "^2.9", | |
//"symfony/dom-crawler": "^5.1", | |
//"clue/mq-react": "^1.2" | |
require_once './vendor/autoload.php'; | |
$url = 'http://example.com/site-with-images'; |
This file contains hidden or 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
web: | |
image: nginx:latest | |
ports: | |
- "8080:80" | |
volumes: | |
- ./public://var/www/api.pagevamp/public | |
- ./:/var/www/api.pagevamp | |
- ./pagevamp.conf:/etc/nginx/conf.d/default.conf | |
links: | |
- php |