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
@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');
~$ 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
@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
@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 \

@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
@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'));
}());
@sos4nt
sos4nt / gist:1363753
Last active September 28, 2015 01:38
Using ruby-debug19 with Ruby 1.9.3, RVM and Bundler
#!/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
@rn0
rn0 / README.markdown
Created February 20, 2012 00:22 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is an extension to Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # 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
@felquis
felquis / IEImageRotate.js
Created March 8, 2012 20:55
Faz uns calculos para aplicar o Matrix e rotacionar elementos no Internet Explorer
// 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'),
@anthonyshort
anthonyshort / _media-queries.scss
Created March 13, 2012 10:37
Media Queries in Sass
// 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