Unsere Setup-Routine für eine Rails-App mit Nginx, Passenger, rvm auf einen Host Europe-VPS mit Ubuntu 10.4.
apt-get update
apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \
| // Credit goes to Ashley Ford, since the idea of this snippet | |
| // was taken from his blog article at http://papermashup.com/experimental-jquery-tooltips/ | |
| // this is a "self-sustained" tooltip, and i stripped the AJAX | |
| // part since i don't need it for now | |
| $(document).ready(function() { | |
| // Tooltip, probando | |
| $("[rel^='tooltip']").bind('mouseover', function(){ | |
| var theMessage = "Tooltip: "+$(this).attr('rel').split(":", 2).slice(1, 2); | |
| $('<div class="tooltip">' + theMessage + '</div>').appendTo('body').fadeIn('fast'); |
| ~$ ARCHFLAGS='-arch i386 -arch x86_64' | |
| ~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes | |
| ~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download | |
| ~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0 | |
| ~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes | |
| ~/RubyCocoa-1.0.0$ ruby install.rb setup | |
| ~/RubyCocoa-1.0.0$ sudo ruby install.rb install |
| # Helpers | |
| def git_update(message) | |
| git :add => ".", :commit => "-m '#{message}'" | |
| end | |
| def git_remove(file) | |
| git :rm => file | |
| end |
| Timecop.travel( 10.minutes.ago ) do | |
| # do some stuff in the past | |
| end | |
| # Return back to normal |
| ;(function(Modernizr, window) { | |
| Modernizr.addTest('positionfixed', function () { | |
| var test = document.createElement('div'), | |
| control = test.cloneNode(false), | |
| fake = false, | |
| root = document.body || (function () { | |
| fake = true; | |
| return document.documentElement.appendChild(document.createElement('body')); | |
| }()); |
| #!/bin/bash | |
| # Run using: bash <(curl -s https://raw.github.com/gist/1363753) | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
| curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem | |
| gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0/ | |
| rm linecache19-0.5.13.gem | |
| rm ruby-debug-base19-0.11.26.gem | |
| bundle update ruby-debug19 |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string| // 08/03/2012, 16:59 - ICOMP | |
| // Simple Rotate Elements in IE | |
| // by @felquis | |
| // Thanks for Lucio, Etiqueta | |
| window.globalVars = {rotatePI : Math.PI * 2 / 360}; | |
| $(window).load(function(){ | |
| $('[data-rotate]').each(function(i, obj){ | |
| // Valor do deg | |
| var $obj = $(obj), | |
| rotate = $obj.css('transform').replace(/rotate\((\-?[0-9]{1,})deg\)/i, '$1'), |
| // Media Queries in Sass 3.2 | |
| // | |
| // These mixins make media queries a breeze with Sass. | |
| // The media queries from mobile up until desktop all | |
| // trigger at different points along the way | |
| // | |
| // And important point to remember is that and width | |
| // over the portrait width is considered to be part of the | |
| // landscape width. This allows us to capture widths of devices | |
| // that might not fit the dimensions exactly. This means the break |