Skip to content

Instantly share code, notes, and snippets.

View example_gist
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
puts "Hello World"
View elastic.json
GET fileinfoindex/elasticfileinfo/_search
{
"aggs": {
"types" : { "terms" : { "field" : "type" } },
"addedby" : { "terms" : { "field" : "createdBy"} }
}
}
View elastic.json
GET fileinfoindex/elasticfileinfo/_search
{
"aggs": {
"types" : { "terms" : { "field" : "type" } },
"addedby" : { "terms" : { "field" : "createdBy.keyword"} }
}
}
View service.cs
var response = _client.Search<ElasticFileInfo>(s => s
.Index(_indexName)
.From(0)
.Size(10000)
.Query(qry => qry.QueryString(q => q.Query(queryString)))
.StoredFields(f => f.Fields(p => p.CreatedBy))
.Aggregations(a => a
.Terms("types", st => st
.Field(f => f.Type))
.Terms("addedby", st => st
View docker-compose.yml
version: '3'
services:
nginx:
build: ./nginx
ports:
- "8080:80"
volumes:
- "/home/ant/projects/nginxreverseproxy/nginx/conf/default.conf:/etc/nginx/conf.d/default.conf"
tomcat1:
View nginx\default.conf
upstream app-a {
server tomcat1:8080;
}
upstream app-b {
server tomcat2:8080;
}
server {
listen 80;
View travis_partial_docker
...
after_script:
- docker image build -f Dockerfile_Travis . --tag $DOCKER_REPO
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker push $DOCKER_REPO
...
@AntonyBaasan
AntonyBaasan / travis_enable_docker
Last active Jul 12, 2018
travis_enable_docker
View travis_enable_docker
...
services:
- docker
...
@AntonyBaasan
AntonyBaasan / text.cs
Last active Nov 26, 2018
XmlConfigurator.Configure
View text.cs
var repos = LogManager.GetRepository(Assembly.GetEntryAssembly());
XmlConfigurator.Configure(repos, new FileInfo(configFile));
log = LogManager.GetLogger(typeof(SomeType))
You can’t perform that action at this time.