February 2012
2 posts
Testing fadeOut event with Jasmine →
Feb 19th
Feb 10th
2 notes
January 2012
1 post
Jan 6th
8 notes
December 2011
1 post
Dec 21st
2 notes
November 2011
8 posts
7 tags
My forked version of wysiwyg editor created by... →
Thanks to creators of this completely library agnostic wysiwyg: (No jQuery, Prototype or similar is required): @tiff @ingochao @uwe
Nov 19th
11 notes
3 tags
WatchWatch
blat: Javier Santana - Cómo montar tu empresa desde cero
Nov 15th
2 notes
5 tags
Using Sass with sprites
It’s very simple and powerful. Look at this: Imagine that your single element’s height is 38px; Ok, you can define a variable with this: $height-element:58px; Ok, and now you have your background sprite: .element { position:absolute; bottom:0; right:0; width:94px; background:url(sprite.png) no-repeat 0 0; height:$height-element; ...
Nov 9th
19 notes
7 tags
Build a powerful Flickr Gallery with Rails and js
If you are using Rails and you need a flickr gallery just bear in mind these two things: - Flickraw gem - Galleria plugin With the first one you need just to add it to your site: FlickRaw.api_key = 'YOUR_API_KEY' FlickRaw.shared_secret = 'YOUR_FLICKR_SECRET' flickr = FlickRaw::Flickr.new And using the complete flickr api, you can use, for example: @photo_sets =...
Nov 7th
8 notes
3 tags
Setting remotes/origin/HEAD to origin/master
Probably you want to track a new branch locally based on a remote. Just something like: git branch --track <new-branch> <remote-branch> Be careful because if you’has selected a remote branch like HEAD, probably you lost the link to master branch. If you want to restart this, you should type: git remote set-head origin master
Nov 7th
274 notes
8 tags
Updating ImageMagick with Brew and MacOSX Lion
Upgrade to MacOSX Lion is not perfect. And ImageMagick is not an exception. First of all (obvious), don’t forget to install XCode (or reinstall the C compiler). Following, probably you have tried to download it the binary source but I prefer still using HomeBrew to these kind of things. To do it with this method, just type the next: cd /usr/local git reset --hard FETCH_HEAD brew install...
Nov 5th
10 notes
5 tags
How to add Zen Coding to Sublime Text 2
Just type: $ hg clone https://bitbucket.org/sublimator/sublime-2-zencoding ZenCoding and reload SublimeText 2! P.S.: If you don’t have mercurial (hq) installed, you can do it so: $ easy_install pip && pip install Mercurial
Nov 2nd
11 notes
3 tags
Adding Sass to Sublime Text2 →
Nov 2nd
23 notes
October 2011
1 post
5 tags
Oct 12th
13 notes
September 2011
3 posts
4 tags
Getting a valid list of urls in a Symfony2 project
In my case, I wanted to get a complete list of valid urls to use Helium-css (to clean all the unused css of the project) and to take the advantage of the routing, I executed this command (you should replace BASE_URL to your base_url: app/console router:debug | awk '{print "BASE_URL"$3}' With this, you only have to paste the list to the helium window (replacing some id…) and you got it!.
Sep 28th
258 notes
5 tags
Rake with Rails 3.1rc1
Do you have an error executing a rake task using the new rails version?: Just do the following: bundle exec rake And if you don’t want remember this command each time, you could make an alias: alias rake="bundle exec rake" Or even add it to your bash profile, ;) Why do you have the error?. The new version of rails breaks a few of things and you should use the version 0.8.7 of this rake...
Sep 28th
296 notes
8 tags
How to search files with less common extensions...
In my case is .twig but you can do it for any extension. It’s simple and you can check it in wiki ack’s page but if you’re not too acquainted with these kind of things, just do the following: mate ~/.ackrc and add these lines: --type-add php=twig And you got it!. P.S.: Other examples: --type-set=sass=.scss --type-set=coffee=.coffee
Sep 15th
21 notes
August 2011
6 posts
4 tags
Learning by accident. Chapter #2134
Playing with Firebug console, if you edit a number value you can do: With arrows (↑/↓) increments are 1[+/-]. So far I knew this… but if you press at same time ⌘ the variations will be 0.1[+/-] or if the key pressed is ⇧ will be 10. It’s a stupid thing but I didn’t know it and it useful for me. I hope you too.
Aug 17th
4 notes
4 tags
A "must" for MacOSX and terminal users  →
This app is wonderful. You can split your terminal window (so many times you want) and to get a full control for everything you do. CMD+D (split vertically) Shift+CMD+D (split horizontally) CMD+Tab (like default terminal app in MacOSX - create a new tab). etc, etc…
Aug 10th
9 notes
4 tags
SASS Bundle for TextMate
mkdir -p ~/Library/Application\ Support/TextMate/Bundles cd ~/Library/Application\ Support/TextMate/Bundles git clone git://github.com/charlesr/ruby-sass-tmbundle.git "Ruby Sass.tmbundle" osascript -e 'tell app "TextMate" to reload bundles'
Aug 9th
4 tags
Installing postgres with Brew in MacOSX
Homebrew is wonderful but sometimes it can be a little headache. For example, if you’ve created a rake task with ruby that assume a role called postgres (by default), probably if you installed with brew you won’t have it. Brew get your system user and unless your name would be postgres, you have to create it. For this reason, I’m going to write the easy steps to create a new...
Aug 8th
3 notes
6 tags
jQuery can't get some properties from a hidden...
Today I founded an error with a plugin called Stylish Select (for customized selects). My select was contained in a hidden content (for filtering searches) and the plugin didn’t customize correctly my combo element. Its height was 0. And what’s the problem?, all its calculated operations are wrong. What’s the solution?, simply. Just find that hidden element (respect a...
Aug 1st
53 notes
5 tags
Bookmarklet for dragging rows
In my job, we’re using a boring tool to distribute tasks. I miss one option to organise my tasks in a specific order (like basecamp, for example). Not to wait for a drupal developer (with admin perms) I’ve added a simple bookmarklet to do this. Do you want to try it? (it works for all tables of your current page). Just drag the following bookmarklet to your bookmarks bar. Drag...
Aug 1st
113 notes
July 2011
6 posts
6 tags
Select customized with jQuery  →
This is my forked version of this plugin. Allows multi-select and single options.
Jul 27th
102 notes
Jul 19th
7 notes
7 tags
Ryan Singer at Future of Web Apps, London 2010 →
Jul 18th
12 notes
6 tags
I'm a Dribble player →
Thanks to Maximilian Schoening for invite me!
Jul 12th
8 notes
4 tags
What is added installing MySQL on MacOSX with...
It was just simple curiosity. I tried to remove all mysql contains from my computer and I ran: brew install mysql I wonder, what’s whole stuff is installed. Listing with: find / -name mysql -print 2> /dev/null And is the...
Jul 12th
24 notes
5 tags
Installing php + phing in MacOsX with Brew
How to install PHP with Brew Grab the latest copy of my PHP brew and copy it into your Homebrew Formula directory. The formula isn’t added by default. curl -O https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb mv php.rb `brew --prefix`/Library/Formula Install php with brew brew install php --with-apache --with-mysql The default location of mysql.sock is in the...
Jul 7th
4 notes
June 2011
10 posts
6 tags
In rvm we trust
If some time you have wrote that you don’t trust in rvm (in a project configuration process I mean): ================================================================ = Trusting an .rvmrc file means that whenever you cd into the = = directory RVM will execute this .rvmrc script in your shell = = = = Now that you have...
Jun 28th
13 notes
6 tags
Bank holidays in whole world →
API for getting data about holidays
Jun 22nd
6 notes
6 tags
To get params url with Javascript
If you want to get the real params (not actual url) you don’t have to pass it to the function. function getValue(varname,url) { // First, we load the URL into a variable if (url == undefined) var url = window.location.href; // Next, split the url by the ? var qparts = url.split("?"); // Check that there is a querystring, return "" if not if (qparts.length == 0) { ...
Jun 22nd
6 notes
5 tags
Vanessa Viaji web →
I designed and developed this web 2 months ago and I forgot to public the url. I hope you like it! (sorry for inconvenience, is in spanish). It’s made of in Ruby on Rails and deployed in Heroku.
Jun 20th
5 notes
4 tags
How to fix cross domain problem with font-face and... →
Firefox requires that all font assets be served from the same domain. Lastly it is possible that you need to add WOFF to your list of MIME types (if you are serving via IIS.)
Jun 16th
4 notes
5 tags
My favourites TextMate PlugIns
To write less - ZenCoding To search faster - Ack To browse better in proyect - ProjectPlus Jasmine snippets provided - Jasmine Bundle Sass - Sass Bundle —- If you have any other, please, share it!
Jun 16th
11 notes
4 tags
Jun 7th
4 notes
5 tags
Background gradient + Background image with CSS3
If we want to make a button (for example) with background gradient plus a concrete image we can do the following: .blue-button {float:left; text-align:center; padding:6px 38px 6px 15px;border:1px solid #A9C5D6; color:white; font:bold 14px Arial; height:18px; text-decoration:none; margin- /* text shadow */ text-shadow:1px 1px 0px #6397B1; /* border*/ -webkit-border-radius: 7px; ...
Jun 7th
3 tags
“sudo /usr/sbin/apachectl restart”
– Apache restart
Jun 2nd
7 notes
4 tags
Showing git branches in your prompt
It’s simply. You only have to add the following in your /etc/bashrc # You should have already defined the PS1 variable. You should update it function parse_git_branch_and_add_brackets { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/' } PS1="\h:\W \u\[\033[0;33m\]\$(parse_git_branch_and_add_brackets) \[\033[0m\]\$ " Reset terminal and you got it! ...
Jun 1st
May 2011
1 post
4 tags
WatchWatch
I was in this conference at Madrid about Javascript
May 8th
April 2011
4 posts
6 tags
WatchWatch
Do you want to write less?
Apr 26th
9 notes
5 tags
WatchWatch
Great talk (in spanish) about Sequel by Fernando Blat (@ferblape) in last MadridRB
Apr 26th
6 tags
ADWE conference about Javascript →
Apr 25th
5 tags
How to move sub or sup tags with css
If we want to edit the sub and sup position by default we should do something like this: sup, sub { height: 0; line-height: 1; vertical-align: baseline; _vertical-align: bottom; position: relative; } sup { bottom: 1ex; } sub { top: .5ex; } And we got it
Apr 8th
2 notes
March 2011
7 posts
7 tags
Dragging elements
We have two lists. Total and associated elements. The main problem with ie is z-index. If we are dragging one element into other list we want to show this element over-all the rest. We have to control this, asking who is dragging what: // First of all, we bind elements to be sortable (with jquery-ui) $( ".all_elements, .associated_elements" ).sortable({ connectWith:...
Mar 31st
9 tags
Mar 22nd
6 notes
5 tags
Amazing and inspiring work →
Mar 21st
4 notes
3 tags
“We can only see a short distance ahead, but we can see plenty there that needs...”
– Alan Turing
Mar 21st
5 notes
6 tags
Cleaning HTML tags
If you are using an API like Tumblr you can get all your posts filtering by text using “&filter=text” parameter (http://www.tumblr.com/docs/en/api) But if you want to show your posts with embedded images (in texts post for example) and line breaks this is a wrong option. What is the solution?, filtering=none (by default) and to use some plugin like jquery-clean that allows to...
Mar 20th
5 tags
Sliding elements with IE6
If you want to slide down some element with jquery you can do it in different ways. But if you want to goal an exactly behavior in all browsers you should forget to use .animate function and change opacity. Everybody knows that IE6 isn’t the best browser driving opacities… For example, you get this: if($('.new_password').css("display") == "none"){ ...
Mar 20th
5 notes
3 tags
Git in terminal with colours
To see better logs, commits, files changed.. Just execute the next line: git config --global color.ui true
Mar 8th
1 note