Skip to content

Instantly share code, notes, and snippets.

Antony Baasandorj AntonyBaasan

Block or report user

Report or block AntonyBaasan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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))
@AntonyBaasan
AntonyBaasan / travis_enable_docker
Last active Jul 12, 2018
travis_enable_docker
View travis_enable_docker
...
services:
- docker
...
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
...
View nginx\default.conf
upstream app-a {
server tomcat1:8080;
}
upstream app-b {
server tomcat2:8080;
}
server {
listen 80;
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 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 elastic.json
GET fileinfoindex/elasticfileinfo/_search
{
"aggs": {
"types" : { "terms" : { "field" : "type" } },
"addedby" : { "terms" : { "field" : "createdBy.keyword"} }
}
}
View elastic.json
GET fileinfoindex/elasticfileinfo/_search
{
"aggs": {
"types" : { "terms" : { "field" : "type" } },
"addedby" : { "terms" : { "field" : "createdBy"} }
}
}
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"
You can’t perform that action at this time.