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
palindromicNumbers = [x*y | x<-[1..999], y<- [1..999], reverse(show(x*y))==show(x*y)] |
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
install: | |
go install . | |
build: | |
go build . | |
run: | |
go run main.go | |
test: build |
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: | |
CGO_ENABLED=0 GOOS=windows go build -a -installsuffix cgo -o myApp.exe . | |
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o myApp . | |
CGO_ENABLED=0 GOOS=darwin go build -a -installsuffix cgo -o myApp . | |
CGO_ENABLED=0 GOOS=freebsd go build -a -installsuffix cgo -o myApp . | |
CGO_ENABLED=0 GOOS=netbsd go build -a -installsuffix cgo -o myApp . | |
CGO_ENABLED=0 GOOS=openbsd go build -a -installsuffix cgo -o myApp . | |
CGO_ENABLED=0 GOOS=solaris go build -a -installsuffix cgo -o myApp . |
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" | |
type Person struct { | |
Name string | |
} | |
func main() { | |
p := Person{Name:"Golang"} |
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 ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"math/rand" | |
"net/http" | |
"time" |
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
FROM rayyildiz/graalvm as builder | |
# Set environment | |
ENV SBT_HOME /usr/lib/sbt | |
ENV PATH $PATH:$SBT_HOME/bin | |
ENV GRAAL_VERSION=1.0.0-rc1 | |
RUN apt-get install bash -y && \ | |
apt-get install ca-certificates -y && \ | |
apt-get install wget -y && \ |
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
version: '2' | |
services: | |
zookeeper-1: | |
image: confluentinc/cp-zookeeper:latest | |
hostname: zookeeper-1 | |
ports: | |
- "12181:12181" | |
environment: | |
ZOOKEEPER_SERVER_ID: 1 | |
ZOOKEEPER_CLIENT_PORT: 12181 |
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
scalaVersion := "2.11.12" | |
lazy val sparkVersion = "2.4.0" | |
val providedDependencies = Seq( | |
"org.apache.spark" %% "spark-sql" % sparkVersion% "provided", | |
"org.apache.spark" %% "spark-mllib" % sparkVersion% "provided", | |
"org.apache.spark" %% "spark-streaming" % sparkVersion% "provided" | |
) |
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 ( | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
const targetURL = "http://rayyildiz.com" // TODO: change with your URL |
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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
var request = event.Records[0].cf.request; | |
var olduri = request.uri; | |
var newuri = olduri.replace(/\/$/, '\/index.html'); | |
if (olduri == "/contact") { | |
newuri = "/contact/index.html"; | |
} |