Skip to content

Instantly share code, notes, and snippets.

View manikrathee's full-sized avatar
🎯
Focusing

Manik Rathee manikrathee

🎯
Focusing
View GitHub Profile
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
@manikrathee
manikrathee / index.html
Created September 18, 2012 19:36
There is probably a lot of place for improvement, but you get the point : one element, custom tooltip.
<span class="tooltip" data-tooltip="Hi! I'm a tooltip!">Hover me</span>
@manikrathee
manikrathee / gist:3837186
Created October 4, 2012 23:49
CSS3 3d Box
<!DOCTYPE HTML>
<html>
<head>
<style>
#rotate{
position: absolute;
top: 400px;
font-size: 20px;
background: #f3f3f3;
color: #333;
@manikrathee
manikrathee / gist:3841848
Created October 5, 2012 19:29
3d Transform
<!DOCTYPE HTML>
<html>
<head>
<style>
#rotate{
position: absolute;
top: 400px;
font-size: 20px;
background: #f3f3f3;
color: #333;
@manikrathee
manikrathee / gist:3890508
Created October 15, 2012 02:21
Boombox - Actions
// Background Change based on track click
$('#main-stream').on('click', '.stream-item', function(){
streamItem = $('this');
albumArt = $('this').data('album-art-background');
console.log( streamItem.data('album-art-background') );
console.log('stream-clicked');
if ($('body').hasClass('active')){
@manikrathee
manikrathee / gist:3890623
Created October 15, 2012 02:55
click, This
// Now Playing & Background Album Art
$('#main-stream').on('click', '.stream-item', function(){
var artist = $('this').find('.artist').text();
var track = $('this').find('.track').text();
var nowPlaying = arist + track;
$('#now-playing-title').text(nowPlaying);
if ($('#now-playing').hasClass('hidden')){
@manikrathee
manikrathee / uber-vs-taxis-manik-rathee-blog
Last active December 20, 2015 11:59
Blog Post for blog.manikrathee.com
The San Francisco Taxi Labor Union is on strike. They are unhappy with Ubers, RideShare and Lyfts taking away their business. But it begs the question - if customers are leaving, are these new innovators to blame?
From my perspective, there is a really simple reason customers are not using regular cabs anymore. Allow me to take my experience and paint you a word picture.
The Process of Finding a Cab
Taxi
Try hailing a cab for 5-10 minutes while several empty ones ignore me and drive past.
Uber
Wait 3 minutes for a driver to arrive and call my phone, while I enjoy a beer at home. Follow their location via GPS.
Then, The Driver Arrives
@manikrathee
manikrathee / _alert.scss
Created August 13, 2013 04:56
Simple Sass Alerts
// Alert System
@mixin alert($color) {
@extend %alert_base;
color: lighten($color, 30%);
// background: $color;
background: darken($color, 4%);
text-shadow: 0 1px 0darken($color, 25%);
border-color: darken(adjust-hue($color, -10), 30%);
@manikrathee
manikrathee / _button.scss
Created August 13, 2013 04:57
Extensive button arrangement in Sass
// ***************************
// $button
// ***************************
@mixin button($color) {
@extend %button_base;
color: lighten($color, 30%);
// background: darken($color, 4%);
// text-shadow: 0 1px 0darken($color, 25%);
border-color: darken(adjust-hue($color, -10), 30%);
@include transparent-gradient;
@manikrathee
manikrathee / super-clickable-button-scss
Last active December 21, 2015 04:49
A Sass version of my '.super-clickable-button' gist: https://gist.github.com/manikrathee/1b1f98577d93844fd5fa
@mixin super-clickable-button($color){
display: block;
background: $color;
background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
background-image: -webkit-gradient(
linear,