Skip to content

Instantly share code, notes, and snippets.

View manikrathee's full-sized avatar
🎯
Focusing

Manik Rathee manikrathee

🎯
Focusing
View GitHub Profile
@manikrathee
manikrathee / Intro
Last active May 17, 2020 13:22
Common UI pattern problem with a simple solution: Space elements without having an extra set of padding at the bottom of a container.
- Div has 10px padding on all sides.
- P or LI's have margin-bottom to space out the next element.
- What you're left with is a giant space at the bottom of the div from the combined properties: padding-bottom: 10px on the Div and margin-bottom: 15px on the last child element. So, instead of using :last-child to try and un-do the styles set on each element, why not set it differently in the first place?
@manikrathee
manikrathee / .htaccess
Created October 28, 2013 02:23 — forked from daneden/.htaccess
Cache Buster for Jekyll - Forked from Dan Eden
RewriteRule (.+)-[a-zA-Z0-9]+(\.(js|css))$ $1$2 [L]
var subpixelWordSpacing = false;
if (document.defaultView && document.defaultView.getComputedStyle) {
// Store the original word spacing on the document element
var originalWordSpacing = document.defaultView.getComputedStyle(document.documentElement, null).wordSpacing;
// Set the word-spacing to half a pixel
document.documentElement.style.wordSpacing = '0.5px';
// This will return either 0px or 1px if sub-pixel word-spacing is not supported, otherwise
@manikrathee
manikrathee / alpha.scss
Last active December 30, 2015 20:19
CSS Properties
.element {
color: lighten($text, 25%);
display: block;
@extend .other-element;
font-size: 1.2em;
@include box;
@include size(54px, 54px, 200px);
@include transition( (background 0.25s ease-in-out),(color 0.25s ease-in-out),(visibility 0.25s ease-in-out) );
left: -2px;
margin: 0;
@manikrathee
manikrathee / _error
Created December 19, 2013 00:22
Jekyll compile issue
Running "jekyll:dist" (jekyll) task
`jekyll build --config _config.yml` was initiated.
Jekyll output:
Warning: Command failed: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1450:in `complete': invalid option: --config (OptionParser::InvalidOption)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1448:in `catch'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1448:in `complete'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1261:in `parse_in_order'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in `catch'
@manikrathee
manikrathee / full-height-header.js
Created January 10, 2014 21:10
A simple bit of JS to set a header image to 100% height
var windowHeight = $(window).innerHeight();
function viewportScale(){
$('#landing').css('height', windowHeight);
}
$(document).ready(function() {
viewportScale();
});

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
"""
Author: [email protected]
to run you will need to install the following:
pip install requests
pip install simplejson
get the auth token and device id by sniffing the nike app syncing
with api.nike.com with charles
@manikrathee
manikrathee / keybase.md
Created March 30, 2014 19:05
keybase.md

Keybase proof

I hereby claim:

  • I am manikrathee on github.
  • I am manikrathee (https://keybase.io/manikrathee) on keybase.
  • I have a public key whose fingerprint is C1FC 86AD 5608 5B89 9A77 89CB 691E FF7F 997B 21C1

To claim this, I am signing this object:

#Reporter Save File Schema

##The Reporter Export File

Reporter saves to your Dropbox account with plaintext JSON files, one for each day. When a Report is entered in the app a file is created for that day if it does not exist. Otherwise, the report is appended to the existing file. The save folder is located in 'Dropbox/Apps/Reporter-App/'.

Reporter save files are named according to the following convention:

YYYY-MM-DD-reporter-export.json