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
// ----------------------------------------------------------
// 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 / 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")
@monkeymonk
monkeymonk / countries.php
Last active April 9, 2019 06:44
PHP Array of countries name (in English) and countries code. #resources
return array(
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
"AI" => "Anguilla",
"AQ" => "Antarctica",
"AG" => "Antigua And Barbuda",
@monkeymonk
monkeymonk / thumbnail.html
Last active December 28, 2015 02:29
Thumbnail block with image :hover effect (image scale and rotate)
<div class="thumbnails thumbnail-style">
<div class="thumbnail-img">
<div class="overflow-hidden">
<img class="img-responsive" src="http://lorempixel.com/253/160/cats/" alt="" />
</div>
<a class="btn-more" href="#">read more +</a>
</div>
<div class="caption">
<h3><a href="#">Project Two</a></h3>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, justo sit amet risus etiam porta sem.</p>
@monkeymonk
monkeymonk / pricing.css
Created November 12, 2013 10:02
Clean and Simple Pricing Table
/*Pricing Page
------------------------------------*/
/*Pricing Head*/
.pricing {
position:relative;
border-radius:3px;
margin-bottom:15px;
box-shadow:0 0 5px #eee;
}
.pricing:hover {
@monkeymonk
monkeymonk / timeline.html
Created December 10, 2013 13:03
Timeline Style and Structure (LESS and HTML) based on Bootstrap v3
<div class="container">
<div class="row">
<div class="col-md-12">
<h4 class="timeline-month"><span>November</span> <span>2013</span></h4>
<ul class="timeline">
<li class="timeline-orange">
<div class="timeline-icon"><i class="glyphicon glyphicon-facetime-video"></i></div>
<div class="timeline-body">
<div class="timeline-header">