Skip to content

Instantly share code, notes, and snippets.

Chintan Tank tankchintan

  • SnagFilms
  • New York
Block or report user

Report or block tankchintan

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
@tankchintan
tankchintan / get-mio-logs.sh
Created Mar 22, 2016
Fetch MIO server logs.
View get-mio-logs.sh
log_destination_dir=$3
cluster=$1
node_index_start=$2
nodex_index_next=$(($node_index_start+1))
node_type=( master job index )
node_indices=( $node_index_start $nodex_index_next )
fetched_files=( )
for current_node_type in "${node_type[@]}"; do
@tankchintan
tankchintan / prestitial.less
Created May 8, 2015
dfp > prestitial oop solution > style
View prestitial.less
@import '../libs/prefixer.less';
@min-z-index: 10000001;
.no-scroll {
overflow: hidden;
}
#prestitial-ad-overlay {
position: fixed;
@tankchintan
tankchintan / prestitial.js
Created May 8, 2015
dfp > prestitial oop solution > prestitial javascript
View prestitial.js
var DfpOutOfPageAdGenerator = DfpOutOfPageAdGenerator || {};
DfpOutOfPageAdGenerator.Prestitial = Class.extend({
properties: {
isAdSkippedManually: false,
dfpCreativeMarkup: undefined,
dfpCreativeParameters: undefined
},
@tankchintan
tankchintan / dfp-prestitial-ad.html
Created May 8, 2015
dfp > prestitial oop solution > markup shell
View dfp-prestitial-ad.html
<link rel="stylesheet" href="/css/dfp/interstitial.css" />
<script src="/js/dfp/prestitial.js"></script>
<div id="prestitial-ad-outer-container">
<div id="prestitial-ad-overlay"></div>
<div id="prestitial-ad-close">Click to Skip Ad</div>
<div id="prestitial-ad-duration-counter"><em>Closing in...</em></div>
<div id="prestitial-ad-logo"></div>
<div id="prestitial-ad-container"></div>
<div id="prestitial-ad-third-party-content-view-tracker"></div>
@tankchintan
tankchintan / DumpDepositoryStructureInToSourceSetsAndSources
Created Dec 28, 2011
code to dump depositorystructure into sourcesets and sources tables
View DumpDepositoryStructureInToSourceSetsAndSources
Hi Meena..............
//Method to dump depositorystructure into sourcesets and sources tables
public String dumpDepositoryStructureInToSourceSetsAndSources() {
//Get all active depositories
for (Depository depository : depositoryDAO.getAll()) {
int count = 1;
View RecentLoginHistoryAction.java
// this is already existing code
for (Memberloginhistory memberloginhistoryFromDB : memberLoginHistoryListFromDB) {
parsedBrowserDetails = memberloginhistoryFromDB.getBrowserdetails();
parsedBrowserDetails = UserAgentUtil.getBrowser(parsedBrowserDetails)[2] + " on "
+ UserAgentUtil.getOS(parsedBrowserDetails)[1];
Member member = memberBO.getById(memberloginhistoryFromDB.getMember().getId());
// Memberloginhistory object values have to retrive in jsp.
@tankchintan
tankchintan / java-sdk-version-changer.sh
Created Nov 11, 2011
Activation and Definition of shell script that changes Java SDK to be Sun JDK if it is OpenJSK
View java-sdk-version-changer.sh
# To be put in /etc/rc.d/rc.local
bash /home/ec2-user/misc/java-version-changer.sh >> /home/ec2-user/misc/java-change.log 2>&1
# Contents of java-version-changer.sh that detects if openJDK is installed, if true first it will
# install sun jdl & then set it as the default Java SDK
dd="`date +%Y_%m_%d__%H_%M_%S`"
if [ `ls -l /etc/alternatives/java | grep openjdk | wc -l` -eq 1 ]; then
echo "$dd - Open JDK"
sudo /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_01/bin/java 20000
sudo /usr/sbin/alternatives --set java /usr/java/jdk1.7.0_01/bin/java
View gist:1338374
SELECT sourceid, url, COUNT( * )
FROM source s
GROUP BY sourceid
ORDER BY COUNT( * ) DESC , url ASC
LIMIT 10000
View gist:1338194
JAVA_HOME=<java location>
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
@tankchintan
tankchintan / gist:1335220
Last active Apr 11, 2017
Procedure for installing and setting Sun JDK Java on Default Amazon Linux AMI
View gist:1335220
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
You can’t perform that action at this time.