Skip to content

Instantly share code, notes, and snippets.

View novrian's full-sized avatar
jangan lupa ngopi

Nono Novrian novrian

jangan lupa ngopi
View GitHub Profile
// Base on awesome work from:
// Mason Wendell http://thesassway.com/intermediate/responsive-web-design-in-sass-using-media-queries-in-sass-32
// Jason Cypret http://jasoncypret.com/responsive-sass-mixin/
@mixin respond-to($media) {
@if $media == smartphone {
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @content }
} @else if $media == smartphone-l {
@media only screen and (min-width : 321px) { @content }
} @else if $media == smartphone-p {
@media only screen and (max-width : 320px) { @content }
/*
* Inspired by:
* http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery
*
* This script is ideal for getting specific class depending on device width
* for enhanced theming. Media queries are fine in most cases but sometimes
* you want to target a specific JQuery call based on width. This will work
* for that. Be sure to put it first in your script file. Note that you could
* also target the body class instead of 'html' as well.
* Modify as needed
@novrian
novrian / cakegittmpdirs
Last active December 14, 2015 03:49 — forked from tijmenb/cakegittmpdirs
# Based on: http://stackoverflow.com/questions/2218075/using-git-with-your-cakephp-project
# Procedure:
# 1. Remove app/tmp/ from .gitignore
# 2. touch app/tmp/empty
# 3. git add app/tmp/empty
# 4. git commit
# 5. Add app/tmp/ to .gitignore
# Clean tmpfiles and delete .gitignore