Skip to content

Instantly share code, notes, and snippets.

@Amit-Hora
Amit-Hora / Install.txt
Last active June 1, 2021 11:38
Nginx OPentracing
Gists are compatible with Nginx v 1.18.0
Step 1 - Download libstdc++.so.6.0.26.zip , location /home/centos
Step 2 - unzip /home/centos/libstdc++.so.6.0.26.zip -d /lib64/
Step 3 - confirm you have GLIBCXX_3.4.26.You can use that using
strings /lib64/libstdc++.so.6 | grep GLIBCXX
Step 4 - Install opentracing module
cd /usr/lib64/nginx/modules
yum install wget
wget -O - https://github.com/opentracing-contrib/nginx-opentracing/releases/download/v0.13.0/linux-amd64-nginx-1.18.0-ngx_http_module.so.tgz | tar zxf -
Step 5 - Install vendor tracing lib
curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.rpm > jdk-8u51-linux-x64.rpm
/etc/profile.d/java.sh
#!/bin/bash
JAVA_HOME=/usr/java/jdk1.8.0_51/
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.
chmod +x /etc/profile.d/java.sh
SELECT a.CountryRegion, a.StateProvince, a.City,
CHOOSE (1 + GROUPING_ID(a.CountryRegion) + GROUPING_ID(a.StateProvince) + GROUPING_ID(a.City),
a.City + ' Subtotal', a.StateProvince + ' Subtotal',
a.CountryRegion + ' Subtotal', 'Total') AS Level,
SUM(soh.TotalDue) AS Revenue
FROM SalesLT.Address AS a
JOIN SalesLT.CustomerAddress AS ca
ON a.AddressID = ca.AddressID
JOIN SalesLT.Customer AS c
ON ca.CustomerID = c.CustomerID
BitSet - By default all the bits are false, 0 , you call set(position) to set that bit in the bit set to true,12
the position starts with one
BitSet bits=new BitSet();
bits.set(1) ---> {1}
BitSet alloes to grow as needed, allowing us to easily manipulate bits while optimizing space
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar &quot;%HOME%\site\wwwroot\gs-serving-web-content-0.1.0.jar&quot;">
</httpPlatform>
</system.webServer>
@Amit-Hora
Amit-Hora / gist:10112933
Created April 8, 2014 11:42
Infinispan with MongoDb as cache store giving exception
I tried using Mongo Db as Infinispan Cache store but facing exception Kindly find the code below
ConfigurationBuilder config = new ConfigurationBuilder();
MongoDBCacheStore strgBuilder=new MongoDBCacheStore();
ConfigurationBuilder b = new ConfigurationBuilder();
b.persistence().addStore(MongoDBCacheStoreConfigurationBuilder.class)
.host( "localhost" )
.port( 27017 )
.timeout( 1500 )
.acknowledgment( 0 )