Skip to content

Instantly share code, notes, and snippets.

View varunachar's full-sized avatar

Varun Achar varunachar

View GitHub Profile
@varunachar
varunachar / iterm.json
Last active September 2, 2024 02:36
iTerm2 profile - Import the json below to get a kickass looking iterm2 UI. Check the comment below for more details on look and feel
{
"Use Non-ASCII Font" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.86277559999999998,
"Red Component" : 0.71165029999999996,
"Blue Component" : 0.9982605
},
@varunachar
varunachar / ANestObject.json
Last active February 25, 2020 01:17
Google Gson TypeAdapterFactory to use with Retrofit when the the object is nested inside another object (Typically an object which contains status code etc) and when the root changes per object like shown below in the sample ANestedObject.json. Then you can use Retrofit normally! Enjoy
// Root is hotel
{
status : "ok",
statusCode : 200,
hotels : [{
name : "Taj Palace",
location : {
lat : 12
lng : 77
@varunachar
varunachar / CacheBuster.java
Last active September 29, 2016 10:04
A cache buster for jsp. Meant for webapp sitting behind a Apache 2 server. Cache is busted by appending a file with it's last modified time and then including it in a JSP. Example : <script type="text/javascript" src="js/trelta-all.min.123345.js" ></script> You don't need to modify the actual name of the file on the hard disk, since we've define…
package com.trelta.commons.web;
import java.io.File;
import org.apache.commons.io.FilenameUtils;
import com.trelta.commons.utils.constants.Settings;
/**
* Cache Buster which appends the last modified time of a file to it's name