Skip to content

Instantly share code, notes, and snippets.

@tanmaypatel
tanmaypatel / User.js
Created December 5, 2013 14:10
Simple JS TDD Setup with Mocha and Chai
define(['jquery', 'underscore', 'backbone'],
function($, _, Backbone)
{
var User = Backbone.Model.extend({
defaults: function()
{
return {
id: -1,
username: '',
@tanmaypatel
tanmaypatel / iOS-7-web-app.html
Created December 6, 2013 07:40 — forked from tfausak/ios-8-web-app.html
HTML Page Template for iOS 7 Web Apps
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
@tanmaypatel
tanmaypatel / disable-hover-on-scroll.css
Created December 10, 2013 08:11
Disable Hover Effects on Scroll
.disable-hover,
.disable-hover * {
pointer-events: none !important;
}
@tanmaypatel
tanmaypatel / Simple HTTP Server.py
Last active January 1, 2016 19:49
Simple HTTP Server in Python 3
python -m http.server <port>
@tanmaypatel
tanmaypatel / server.js
Created January 6, 2014 12:59
Simple HTTP Server in Node JS
var connect = require('connect'),
http = require('http'),
app;
var serverPort = 9090;
app = connect()
.use(connect.static(__dirname));
http.createServer(app).listen(serverPort, function()
@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 / breakpoints.less
Created February 4, 2014 08:06
Bootstrap's Media Query Breakpoints (LESS Version)
// Media queries breakpoints
// --------------------------------------------------
// Extra small screen / phone
// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1
@screen-xs: 480px;
@screen-xs-min: @screen-xs;
@screen-phone: @screen-xs-min;
// Small screen / tablet
@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 / jqmFAIcons.less
Created February 4, 2014 08:16
Using FontAwesome icons in jQuery Mobile!
[class^="ui-icon-fa"],
[class*=" ui-icon-fa"]
{
background-image: none;
&:before
{
font-family:FontAwesome!important;
display: inline-block;
font-style: normal;
@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.