Skip to content

Instantly share code, notes, and snippets.

@tanmaypatel
tanmaypatel / page-transitions.less
Created February 4, 2014 08:01
Changing Transitions of Pages in jQuery Mobile 1.4.0 using LESS and 3L
.slide
{
@animation-duration: 500ms;
&.in
{
.transform(translateX(0) scale(1));
.animation(inanimation @animation-duration ease-in-out);
.opacity(1);
}
@tanmaypatel
tanmaypatel / jquery-mobile-theme.less
Created February 4, 2014 08:11
LESSified jQuery Mobile Theme (jQuery Mobile 1.4.0)
@global-font-family: @contentFontFamily;
@global-corner-radius-blocks: @controlsBorderRadius;
@global-corner-radius-buttons: @controlsBorderRadius;
@global-box-shadow: @shadow;
@global-inset-box-shadow: @shadow;
@global-icon-color: white;
@global-icon-shadow: ~"none";
@bar-background-color: @headerBackgroundColor;
@bar-border-color: darken(@headerBackgroundColor, 5%);
@tanmaypatel
tanmaypatel / android-settings.txt
Created February 6, 2014 09:19
Accessing Internet on Android Emulator behind Corporate Firewall
In order to use internet on emulator if you are setting behind a proxy server perform the following steps:
Go to settings->Wireless & networks->mobile networks->Access Point Names.
Press menu button. an option menu will appear.
from the option menu select New APN.
Click on Name. provide name to apn say My APN.
Click on APN. Enter www.
Click on Proxy. enter your proxy server IP. you can get it from internet explorers internet options menu.
@tanmaypatel
tanmaypatel / .gitconfig
Created February 6, 2014 13:07
Git Behind Corporate Firewall FTW!
Add these entried to your '.gitconfig' file in your user directory (go to %USERPROFILE%):
[url "https://"]
insteadOf = git://
[http]
proxy = http://<proxy_server>:<port>/
[https]
proxy = http://<proxy_server>:<port>/
@tanmaypatel
tanmaypatel / UploadService.js
Last active August 29, 2015 13:56
Uploading files using AJAX
// Library used: http://malsup.com/jquery/form/
define(['jquery',
'amplify',
'moment'],
function($, amplify, moment, undefined)
{
var UPLOAD_SERVICE_BASE = 'http://127.0.0.1:8080/';
var FileUploadService = function(){};
@tanmaypatel
tanmaypatel / Gruntfile.js
Created April 18, 2014 13:02
Grunt Configuration
module.exports = function(grunt)
{
require('time-grunt')(grunt);
require('load-grunt-config')(grunt, {
config: {
srcLocation: 'src',
distLocation: 'dist'
}
});
@tanmaypatel
tanmaypatel / stickyfooter.html
Created July 10, 2014 07:36
Sticky Footer with Bootstrap!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sticky footer &middot; Twitter Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS -->
<link href="../assets/css/bootstrap.css" rel="stylesheet">
@tanmaypatel
tanmaypatel / elements.html
Created September 26, 2014 14:56
Bouncing Chameleon Spinner - LessHat version!
<div class="spinner">
<div class="element1"></div>
<div class="element2"></div>
</div>

CSS Layout Debbuger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}