Skip to content

Instantly share code, notes, and snippets.

View erotte's full-sized avatar
🏡
Arbeit Arbeit Arbeit

Eckhard Rotte erotte

🏡
Arbeit Arbeit Arbeit
View GitHub Profile
@bobslaede
bobslaede / modernizr.positionfixed.js
Created September 16, 2011 08:50
Modernizr position fixed check
;(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'));
}());
@hukl
hukl / Time.rb
Created September 13, 2011 15:08
Got to love ruby
Timecop.travel( 10.minutes.ago ) do
# do some stuff in the past
end
# Return back to normal
@erotte
erotte / server_setup.md
Created July 26, 2011 20:04
Server Setup Ubuntu 10.4/rvm/nginx/passenger Hosteurope VM

Server Setup

Unsere Setup-Routine für eine Rails-App mit Nginx, Passenger, rvm auf einen Host Europe-VPS mit Ubuntu 10.4.

Installation der benötigten Pakete

apt-get update

apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \

@dennisreimann
dennisreimann / rails-app-template.rb
Created February 28, 2011 22:37
My template for generating new rails apps
# Helpers
def git_update(message)
git :add => ".", :commit => "-m '#{message}'"
end
def git_remove(file)
git :rm => file
end
~$ 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
@rmontagud
rmontagud / tooltip.js
Created October 6, 2009 11:03
Tiny jQuery tooltip
// 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');