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
| FROM golang:alpine | |
| WORKDIR /go/src/github.com/mishudark/hello | |
| RUN mkdir -p cmd/hello | |
| COPY main.go cmd/hello/ | |
| RUN CGO_ENABLED=0 GOOS=linux go install -ldflags "-s" -a -installsuffix cgo ./cmd/... | |
| FROM alpine:latest | |
| RUN apk --no-cache add ca-certificates |
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
| echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle | |
| echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse | |
| net.ipv4.tcp_tw_recycle = 1 | |
| net.ipv4.tcp_tw_reuse = 1 |
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
| version: '2.0' | |
| services: | |
| mongo: | |
| image: jadsonlourenco/mongo-rocks | |
| environment: | |
| AUTH: "no" | |
| DB_USER: "user" | |
| DB_PASS: "pass" | |
| DATABASE: "parse" | |
| ports: |
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" | |
| "regexp" | |
| "strconv" | |
| ) | |
| func Currency(ammount interface{}) (string, error) { | |
| var ok bool |
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 java.io.*; | |
| import java.net.*; | |
| public class Proxy { | |
| int local_port; | |
| int destiny_port; | |
| String destiny_url; | |
| ServerSocket server; |
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
| app.service('imageService', function ($http, $q, $timeout) { | |
| var options = {}; | |
| this.createThumb = function(img, width, height){ | |
| self = {}; | |
| options.thumbnailWidth = width; | |
| options.thumbnailHeight = height; | |
| self.resultD = $q.defer(); | |
| $timeout(function () { thumb(self, img) }); | |
| return self.resultD.promise; | |
| }; |
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
| sed 's|\([href|src]\)="\([^"]*\)"|\1="{% static '\''\2'\'' %}"|' |
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
| curl -XPUT "http://127.0.0.1:9200/cronologias" -d ' | |
| { | |
| "settings": { | |
| "number_of_shards": 1, | |
| "analysis": { | |
| "filter": { | |
| "autocomplete_filter": { | |
| "type": "edge_ngram", | |
| "min_gram": 1, | |
| "max_gram": 20 |
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
| source /app/.profile.d/python.sh |
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
| diff --git a/beego.go b/beego.go | |
| index e648480..5ddedc7 100644 | |
| --- a/beego.go | |
| +++ b/beego.go | |
| @@ -352,7 +352,7 @@ func initBeforeHttpRun() { | |
| } | |
| } | |
| - if SessionOn { | |
| + if SessionOn || UseSessions { |