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" | |
"os" | |
"bufio" | |
"strings" | |
) | |
func main() { |
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" | |
import "os" | |
import "strconv" | |
// extended euclidean algorithm | |
// Example: `go run eea.go 35 15` | |
func main() { | |
if len(os.Args) != 3 { |
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 app = express() | |
// !!! This is a workaround for local development only. NEVER DO THIS ON PRODUCTION !!! SOC would kill you. And your family. | |
let allowCrossDomain = function(req, res, next) { | |
res.header('Access-Control-Allow-Origin', 'http://localhost:5000') | |
res.header('Access-Control-Allow-Headers', 'Authorization') | |
res.header('Access-Control-Allow-Credentials', 'true') | |
next() |