This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Attempt to make a drop-and-forget bunch of scripts that mimick some missing html5 goodies automatically | |
// Example: | |
// $(document).ready(function() { | |
// ProvideHtml5.autofocus() | |
// ProvideHtml5.datepicker() | |
// ProvideHtml5.forcenumber() | |
// }) | |
// | |
// Now a real git project, over here: http://github.com/sunny/provide-html5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Font stacks based on system fonts | |
--------------------------------- | |
Times New Roman stack | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
Georgia stack: | |
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, Palatino, Palatino Linotype, Times, Times New Roman, serif; | |
Garamond stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
##### Easily enable clearType on windows. | |
##### | |
*** WHAT IT DOES *** | |
It asks the user to install an activex control, signed by microsoft. | |
This activex control allows cleartype options to be set using javascript. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($) { | |
// Slideshow | |
$.fn.slideshow = function(options) { | |
var opts = $.extend({}, { | |
delay:1000, | |
interval:5000, | |
panels:'li' | |
}, options); | |
return this.each(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// maxheight + maxwidth | |
img { | |
/* For good browsers :) */ | |
max-height: 510px; | |
max-width: 510px; | |
/* Feed the devil :) */ | |
width: expression(this.offsetWidth>=this.offsetHeight?Math.min(500, this.offsetWidth) : 'auto'); | |
height: expression(this.offsetHeight>this.offsetWidth?Math.min(500, this.offsetHeight) : 'auto'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
How to use ? | |
Easy ! just apply the method to your forms : | |
$('form').expand_select(); | |
*/ | |
$.fn.expand_select = function () { | |
if (!$.browser.msie) return; | |
var s = $(this), | |
expand = function() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.rotate(@deg: 0){ | |
@degree: @deg; | |
@rotation: `parseInt(this.degree.toJS())`; | |
@degToRadian: `Math.PI * 2 / 360`; | |
@rad: `this.rotation.toJS() * this.degToRadian.toJS()`; | |
@M11: `Math.cos(this.rad.toJS())`; | |
@M21: `Math.sin(this.rad.toJS())`; | |
// the properties | |
-moz-transform: rotate(@deg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS responsive images</title> | |
<style> | |
/* Play nice with existing requirements for | |
Responsive Images polyfill */ | |
/* Doesn't stop original source image being |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the .htaccess file in our document root. | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{SERVER_PORT} !^3000$ # edit the 3000 port with your node app port | |
RewriteCond %{REQUEST_URI} .*\.(styl|coffee|less) # stylus, coffeescript and less files are managed | |
RewriteRule (.*) http://%{HTTP_HOST}:3000%{REQUEST_URI} [P] # edit the 3000 port with your node app port | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REMOTESERVER="your_server" # adresse du dépôt distant | |
REMOTESERVER_USER="ssh_user" # identifiant du serveur distant | |
REMOTE_GITFOLDER="/chemin/vers/depot/nu/" # chemin du dépôt nu sur le serveur distant | |
ACTION=$1 | |
REMOTE_GITREPO="$REMOTE_GITFOLDER$PROJECTNAME.git" | |
LOCALPATH=`pwd` | |
PROJECTNAME=${PWD##*/} |
OlderNewer