Skip to content

Instantly share code, notes, and snippets.

View jestan's full-sized avatar

Jestan Nirojan jestan

View GitHub Profile
package sample.cache;
import org.infinispan.Cache;
import org.infinispan.configuration.cache.CacheMode;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.cache.StorageType;
import org.infinispan.configuration.global.GlobalConfiguration;
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
import org.infinispan.eviction.EvictionStrategy;
@jestan
jestan / gist:aeb360a268d97a631f606633127635ee
Created November 23, 2018 08:55
Java Service Wrapper with JProfiler
wrapper.java.additional.19=-agentpath:/jprofiler10.1.4/bin/linux-x64/libjprofilerti.so=port=11002
@jestan
jestan / gist:3b88db35c43d96994026bd7d0067809a
Created September 8, 2018 11:49
Infinispan RocskDB PersistenceManagerCloseableSupplier Thread Blocking Issue
Dump-1
INFO | jvm 1 | 2018/09/08 11:39:48 | "http-nio-10.10.34.36-17002-exec-246" #516 daemon prio=5 os_prio=0 tid=0x00007f91f40c0000 nid=0x42c7 waiting on condition [0x00007f91492c2000]
INFO | jvm 1 | 2018/09/08 11:39:48 | java.lang.Thread.State: TIMED_WAITING (parking)
INFO | jvm 1 | 2018/09/08 11:39:48 | at sun.misc.Unsafe.park(Native Method)
INFO | jvm 1 | 2018/09/08 11:39:48 | - parking to wait for <0x000000074ba6b4e8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
INFO | jvm 1 | 2018/09/08 11:39:48 | at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
INFO | jvm 1 | 2018/09/08 11:39:48 | at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
INFO | jvm 1 | 2018/09/08 11:39:48 | at java.util.concurrent.ArrayBlockingQueue.offer(ArrayBlockingQueue.java:379)
INFO | jvm 1 | 2018/09/08 11:39:48 | at org.infinispan.persistence.util.PersistenceMan
@jestan
jestan / gist:aeb80b9d1978049493bf
Created January 12, 2016 08:29
Resetting System Time Using NTP
sudo service ntp stop
sudo ntpd -gq
sudo service ntp start
@jestan
jestan / gist:89d654aae0e19cc2c7c5
Created December 3, 2015 09:52
ngrep commands
### command line http packet capture
sudo ngrep -W byline -d lo port 80
@jestan
jestan / gist:8919b91eca5a7a43d3d6
Created August 24, 2015 06:32
CPU Profiling with Perf
# run following command as root for 2 mins to collect data, data will be written into "perf.data" file
perf record -F 99 -p <PID>
# run following command to display the recoded data
perf report
@jestan
jestan / gist:253f617aae2edf542b9a
Last active August 29, 2015 14:26
Command Line Kung Fu
1. Count unique lines in a file
cat <file-path> | sort | uniq | wc -l
2. Append Given Characters in each line of the file
sed 's/$/<data>/' input.txt > output.txt
3. Find corrupted jar files in local maven repostiory
Learning Rust
http://www.rust-lang.org
http://doc.rust-lang.org/book/README.html
http://rustbyexample.com
http://words.steveklabnik.com/a-new-introduction-to-rust
@jestan
jestan / scala@hsenidmobile.md
Last active August 29, 2015 14:15
scala@hsenidmobile

Installation

$SCALA_HOME

Start using REPL

Start using Scala Doc

Setup Intellij Idea