Skip to content

Instantly share code, notes, and snippets.

View monkeymonk's full-sized avatar
😶
β+∂(ℤ²-i)ℕ×g³=α!

Stéphan Zych monkeymonk

😶
β+∂(ℤ²-i)ℕ×g³=α!
View GitHub Profile
html, body
height: 100%
#outer-wrap, #inner-wrap
position: relative
width: 100%
min-height: 100%
#outer-wrap
overflow: hidden
@mixin flippy($speed: 0.5s, $perspective: 500, $bgcolor: #fff)
position: relative
@include perspective($perspective)
.front, .back
background-color: $bgcolor
@include transition(all $speed ease-in-out)
@include backface-visibility(hidden)
@include transform-style(preserve-3d)
height: 100%
width: 100%
@monkeymonk
monkeymonk / uri.js
Last active September 18, 2015 12:08 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@monkeymonk
monkeymonk / ajaxify-html5.js
Created May 29, 2012 22:37 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
// Check to see if History.js is enabled for our Browser
@monkeymonk
monkeymonk / .htaccess
Created June 12, 2012 06:00 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
@monkeymonk
monkeymonk / gist:2951394
Created June 18, 2012 23:19
Delete all .svn folder
find ./ -name ".svn" | xargs rm -Rf
@monkeymonk
monkeymonk / gist:3028852
Created July 1, 2012 16:21
Easy Tooltip 1.0 - jQuery plugin
/*
* Easy Tooltip 1.0 - jQuery plugin
* written by Alen Grakalic
* http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin
*
* Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* Built for jQuery library
@monkeymonk
monkeymonk / filters.php
Created December 23, 2014 13:34
Get current template name in Laravel Blade.
// allow $view_name in views
View::composer('*', function ($view) {
View::share('view_name', $view->getName());
});
@monkeymonk
monkeymonk / placeholder.coffee
Last active December 18, 2015 19:00 — forked from wenjul/placeholder.css
jQuery simple placeholder support
supportsPlaceholder = "placeholder" of document.createElement("input")
$("[placeholder]").each ->
unless supportsPlaceholder
self = $(this)
self.val(self.attr("placeholder")).addClass "placeholder" if self.val() is ""
self.focus ->
self.val("").removeClass "placeholder" if self.val() is self.attr("placeholder")