Skip to content

Instantly share code, notes, and snippets.

View ogorzalka's full-sized avatar
😎
Polloractive!

Olivier Gorzalka ogorzalka

😎
Polloractive!
View GitHub Profile
@ogorzalka
ogorzalka / dabblet.css
Created January 18, 2012 20:28
Tuto Pseudo-éléments - Exemple 4
/**
* Tuto Pseudo-éléments - Exemple 4
*/
@font-face{font-family:icons;src:url('http://fico.lensco.be/f/fico.eot');src:url('http://fico.lensco.be/f/fico.eot?#iefix') format('embedded-opentype'),url(data:font/truetype;charset=utf-8;base64,AAEAAAAQAQAABAAARkZUTV8+JbYAAAEMAAAAHEdERUYAZgAEAAABKAAAACBPUy8yZ4lJqQAAAUgAAABgY21hcAP25ogAAAGoAAACYmN2dCAJDgnDAAAEDAAAACZmcGdtD7QvpwAABDQAAAJlZ2FzcAAAABAAAAacAAAACGdseWZZWpTJAAAGpAAAIMBoZWFk+O4ZFQAAJ2QAAAA2aGhlYQd7A6oAACecAAAAJGhtdHjUPQWRAAAnwAAAAORsb2Nh8aD50AAAKKQAAAB0bWF4cAFaATgAACkYAAAAIG5hbWVHWuEQAAApOAAAA0Bwb3N0nGv7gAAALHgAAAFqcHJlcAJ3zycAAC3kAAABHwAAAAEAAAAAyYlvMQAAAADKy0wjAAAAAMrpamEAAQAAAA4AAAAYAAAAAAACAAEAAQA4AAEABAAAAAIAAAADA94BkAAFAAACigJYAAAASwKKAlgAAAFeADIA8AAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVS1dOAEAAIOAAAyD/OAAAA5EAeAAAAAEAAAAAAysDhAAAACAAAQAAAAMAAAADAAAAHAABAAAAAAFcAAMAAQAAABwABAFAAAAATABAAAUADAAhACsALQA/AEMARQBMAFAAVABnAGkAbQBwAHYAegDXIZMhqSKVIpcinSMCIxoltiYBJgUmayaRJpkmoCcJJw4nFCdkJ/IrB+AA//8AAAAgACsALQA/AEEARQBMAFAAVABhAGkAbABwAHIAegDXIZAhqSKVIpcinSMC
@ogorzalka
ogorzalka / async.html
Created January 6, 2012 21:58 — forked from chriscoyier/async.html
How some different companies load their third-party JS async style
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
@ogorzalka
ogorzalka / project.sh
Created November 17, 2011 13:52
Project management
#!/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##*/}
@ogorzalka
ogorzalka / .htaccess
Created October 12, 2011 09:26
Node files are redirected to the right node app port
# 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>
@ogorzalka
ogorzalka / css-responsive-images-alt.html
Created May 19, 2011 07:23 — forked from anthonyshort/css-responsive-images-alt.html
Idea for CSS-only responsive images using CSS3 generated content and attr() function. No browser implementation as of May 2011
<!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
@ogorzalka
ogorzalka / rotate.less
Created May 2, 2011 12:46
Cross Browser rotation with lessjs
.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);
@ogorzalka
ogorzalka / jQuery.expand_select.js
Created December 21, 2010 16:24
IE Select Element Fix, jQuery
/*
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()
@ogorzalka
ogorzalka / max-dimensions for IE6
Created November 10, 2010 11:05
it's a fucking hack but it can be useful
// 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');
}
;(function($) {
// Slideshow
$.fn.slideshow = function(options) {
var opts = $.extend({}, {
delay:1000,
interval:5000,
panels:'li'
}, options);
return this.each(function() {
#####
##### 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.