Skip to content

Instantly share code, notes, and snippets.

View AbhishekGhosh's full-sized avatar
😊
Happy

Abhishek Ghosh AbhishekGhosh

😊
Happy
View GitHub Profile
http://maps.googleapis.com/maps/api/streetview?size=600x300&location=46.414382,10.013988&heading=151.78&pitch=-0.76&sensor=false
@AbhishekGhosh
AbhishekGhosh / maps base 64
Created June 26, 2013 08:55
Maps with base 64 encoding
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.net.URL;
import java.io.BufferedReader;
@AbhishekGhosh
AbhishekGhosh / twitter-profile-template.html
Last active October 11, 2021 02:50
Twitter Profile HTML
</head>
<body class="t1 logged-in user-style-AbhishekCTRL" dir="ltr">
<div id="doc" class="route-home">
<div class="topbar js-topbar">
<div id="banners" class="js-banners">
</div>
<div class="global-nav" data-section-term="top_nav">
<div class="global-nav-inner">
<div class="container">
@AbhishekGhosh
AbhishekGhosh / mod_pagespeed
Created July 1, 2013 23:06
mod_pagespeed htaccess for Rackspace Cloud Sites with Genesis. I can give warrenty for the others. Without CDN you can load within 1.9 seconds - http://www.webpagetest.org/result/130701_B6_1GWP/1/details/
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary on
ModPagespeedXHeaderValue "Powered By mod_pagespeed"
ModPagespeedEnableFilters add_instrumentation
ModPagespeedEnableFilters extend_cache
ModPagespeedForceCaching on
ModPagespeedDisallow *timthumb.php*
ModPagespeedDomain http://thecustomizewindows.com
ModPagespeedDomain http://*.google.com
<!--PHP Part-->
<?php
$str = <<<EOS
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">
<linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#6356ff" stop-opacity="1"/>
<stop offset="100%" stop-color="#75b6ff" stop-opacity="1"/>
</linearGradient>
@AbhishekGhosh
AbhishekGhosh / css.css
Created July 2, 2013 05:17
Normal CSS
.certain-div-class {
width: 45px;
background: transparent url(/images/myimage.jpg) top left no-repeat;
}
.my-custom-div-class {
width: 45px;
background: transparent url(data:image/png;base64,LONG-STRING-OF-BASE64-TEXT) top left no-repeat;
}
@AbhishekGhosh
AbhishekGhosh / print javascript.html
Last active December 19, 2015 09:59
Print Javascript
<!-- If you want to use rel microformat : -->
<a href="javascript:window.print()" rel="print">Print This!</a>
<!-- Without rel : -->
<a href="javascript:window.print()">Print This!</a>
<!-- Both will work, there is no difference in function. -->
<!-- Part 1 : Add this on header before the head closes with </head> tag -->
<script type="text/javascript">
<!--
//-->
</script>
<!-- Part 2 : Add where you want to render the print button. Value field determines the label of the button -->
<form>
@AbhishekGhosh
AbhishekGhosh / HTML5-Print.html
Created July 5, 2013 20:27
HTML5 Print Button
<button onclick="javascript:window.print()">Print This Webpage</button>