Skip to content

Instantly share code, notes, and snippets.

View cyrilf's full-sized avatar
🌱
what's up!

cyril cyrilf

🌱
what's up!
View GitHub Profile
@cyrilf
cyrilf / zlogin Ezio
Created March 7, 2013 08:36
Zlogin for ZSH [Ezio]
#Zlogin by Cyril F [Ezio]
echo "
_|_|_|_| _|
_| _|_|_|_| _|_|
_|_|_| _| _| _| _|
_| _| _| _| _|
_|_|_|_| _|_|_|_| _| _|_| "
echo -e "\e[0;35m
@cyrilf
cyrilf / getNumber.js
Created December 21, 2012 22:05
A little improvement of parseFloat function to handle string in ending with %.
var f = getNumber('23.7'); // f = 23.7
//var f = getNumber(23.7); // f = 23.7
//var f = getNumber('23.7 px'); // f = 23.7
//var f = getNumber('23.7 %'); // f = 0.237
function getNumber(input) {
if( typeof input === 'string' && input.slice(-1) === '%') {
input = parseFloat(input.slice(0,-1))/100;
} else {
input = parseFloat(input);
@cyrilf
cyrilf / rmTopFrame.js
Created December 20, 2012 22:02
Remove Google Images Frame on your site and close it.
if (top.location != self.location)
top.location = self.location;