This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static InputStream readFromCacheSync(String imageUrl) { | |
CacheKey cacheKey = DefaultCacheKeyFactory.getInstance().getEncodedCacheKey(ImageRequest.fromUri(imageUrl), null); | |
StagingArea stagingArea = StagingArea.getInstance(); | |
EncodedImage encodedImage = stagingArea.get(cacheKey); | |
if (encodedImage != null) { | |
return encodedImage.getInputStream(); | |
} | |
try { | |
return readFromDiskCache(cacheKey); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download PCRE and nginx source | |
sudo mkdir -p /usr/local/src | |
cd /usr/local/src | |
# copy PCRE to directory | |
# eg. cp /tmp/pcre-8.20.tar.gz /usr/local/src/ | |
tar xzvf pcre-8.20.tar.gz | |
cd pcre-8.20 | |
./configure --prefix=/usr/local | |
make && sudo make install && make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* (C)Leanest CSS spinner ever | |
*/ | |
@keyframes spin { | |
to { transform: rotate(1turn); } | |
} | |
.progress { | |
position: relative; |