Skip to content

Instantly share code, notes, and snippets.

View mfo's full-sized avatar
part time available for intersting projects

mfo mfo

part time available for intersting projects
View GitHub Profile
mfo / gist:857274
Created March 6, 2011 13:13
[polyfills] sass & css3pie for border radius, box shaddow
View gist:857274
group of css3pie mixins:
define browser compliant shortcut for:
- border-radius
- box-shaddow
desc: css3pie_box_shaddow apply a box-shaddow with css3pie 'framework'
mfo / gist:857283
Created March 6, 2011 13:22
RVM + gemset with a ruby-1.9.2... crappy with ubuntu...
View gist:857283
# setup rvm gemset
sudo rvm install ruby-1.9.2-p136
sudo rvm use ruby-1.9.2-p136@my_gemset --create
# setup apt repo and download needed lib in order to compile ruby1.9.2
sudo add-apt-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install libopenssl-ruby1.9.2 libxslt-dev libxml2-dev sqlite3 libsqlite3-dev
# extract package with rvm in the gemset
mfo / gist:857280
Created March 6, 2011 13:19
[IE Testing] Virtual box install with an MS ISO for Vista
View gist:857280
# install wine, Download on MS a virtual machine dedicated to IE.
sudo aptitude install wine virtualbox-ose
# Go on
# get iso that is interesting for you
wine /home/mfo/Downloads/IE7-VIS1.exe
# convert MS format to virtual box, may take some time
VBoxManage clonehd Vista\ Business\ with\ IE7.vhd ie7.vdi --format vdi
View gist:857397
<!-- css .nested1 .nested2 => la div nested2 -->
<div class"nested1">
<div class="nested2">
<!-- css .chained1.chained2 => la div qui possede les deux classes => je sais pas si IE tolererait -->
<div class"chained1 chained2">
mfo / gist:857829
Created March 6, 2011 22:56
View gist:857829
- # dont think to much :-) keep it simple and embrace jQuery UI component lib
%ul#c_evt_popin "event creator: #{}"
%li.created_at= "created on: #{@event.created_at}"
%li.nbpict= "event photos: "
%li.nbpict= "event date: "
%li.nbpict= "contributors: #{@event.sources.size}"
-content_for :additional_bottom_js do
mfo / gist:872887
Created March 16, 2011 17:32
# install IE testing environment on a mac
View gist:872887
# mac version...
brew install wine
# download an ISO of xp :
wine XPSP3_IE.exe # wine will ask an output folder for a .vhd file
# download a VM img converter :
# convert the img
/Applications/ convert -O vmdk -f vpc ./IE8Compat.vhd ./xp_sp3_ie_tester.vmdk
mfo / gist:874019
Created March 17, 2011 08:54
from emacs to textmate
View gist:874019
# set dir which store Bundles :
mkdir -p /Library/Application\ Support/TextMate/Bundles
cd /Library/Application\ Support/TextMate/Bundles
# get some bundles for rails
svn co " Haml.tmbundle"
svn co " Sass.tmbundle"
git clone git:// "SCSS.tmbundle"
# open your rails project, menu => Bundles => Bundle Editors => Reload Bundles
View secu power
# find a keychain
!security 2>&1 >/dev/null find-generic-password -gs \"GitHub\" | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
View gist:1033248
# coffee bootstrap
# installing node :
brew install node
curl | sh
npm install -g
npm install stitch
npm install request
npm install less
View working with indexes in mongo db
from mongo console :
# a few usefull command on mongo cli
show dbs
use sharypic_development
# adding sparse index
db.users.ensureIndex({invide_code: 1}, {sparse: true, unique: true})
# rename a datbase