Moved to https://gist.github.com/dkubb/28403
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fakebug = function() { | |
var firebug_methods = ["log", "info", "debug", "warn", "error", "assert", "dir", "dirxml", "trace", "group", "groupEnd", "time", "timeEnd", "profile", "profileEnd", "count"]; | |
window.console = {}; | |
for(var i=0;i<firebug_methods.length;i++) { | |
window.console[firebug_methods[i]] = function() {}; | |
} | |
}; | |
if(!window.console) { fakebug(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function highdpi_init() { | |
if(jQuery('.replace-2x').css('font-size') == "1px") { | |
var els = jQuery(".replace-2x").get(); | |
for(var i in els) { | |
var src = els[i].src | |
src = src.replace(".png", "@2x.png"); | |
els[i].src = src; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Startup script for the Jenkins Continuous Integration server | |
# (via Jakarta Tomcat Java Servlets and JSP server) | |
# | |
# chkconfig: - 85 15 | |
# description: Jakarta Tomcat Java Servlets and JSP server | |
# processname: tomcat | |
# pidfile: /var/run/jenkins.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2011-05-08 20:11:56,684 INFO [Log4jLogger] : DataObjects::SQLError - DSRA9122E: class com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement enthält keine Objekte vom Typ interface oracle.jdbc.OraclePreparedStatement.: | |
C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/WEB-WINDOWS7DEVNode01Cell/bds_war.ear/bds.war/WEB-INF/bundle/jruby/1.8/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:276:in `with_connection' | |
C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/WEB-WINDOWS7DEVNode01Cell/bds_war.ear/bds.war/WEB-INF/bundle/jruby/1.8/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:113:in `create' | |
C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/WEB-WINDOWS7DEVNode01Cell/bds_war.ear/bds.war/WEB-INF/bundle/jruby/1.8/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:85:in `each' | |
C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/WEB-WINDOWS7DEVNode01Cell/bds_war.ear/bds.war/WEB-INF/bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USAGE: | |
# ruby -e "$(curl -fsSL https://raw.github.com/gist/1011972/2e6ac978bc06905f60e380b5fe5abbf898b3af0a)" <directory> | |
# for example: | |
# ruby -e "$(curl -fsSL https://raw.github.com/gist/1011972/2e6ac978bc06905f60e380b5fe5abbf898b3af0a)" . | |
require 'rubygems' | |
require 'yaml' | |
YAML::ENGINE.yamler = 'psych' | |
directory = ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIL when you drill in your wall (eg to hang up a shelf), these are ways to avoid drilling into a power | |
supply: | |
- I always thought this rule of thumb would suffice: do not drill within a straight vertical or | |
horizontal line from power sockets. TIL in Germany to be on the safe side, you need to add a 20cm safety | |
distance to each side of these lines. Within this distance can be supply lines too! | |
- Power supply line detectors are worthless when they are cheap, the pricier ones can help you a bit, but | |
they still are no guarantee: when the lines are deeper within the wall, they can not be detected exactly | |
at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Selector de idioma | |
#dependencias: | |
# 1 - Rack locale del paquete Rack-contrib [1] | |
# USO: Se usa para detectar el idioma definido por el usuario en su browser ['HTTP_ACCEPT_LANGUAGE'] | |
# Esplicado aquí http://guides.rubyonrails.org/i18n.html#using-accept-language | |
# [1] http://github.com/rack/rack-contrib | |
# 2 - Routing-filter [1] | |
# USO: Establecer el locale en las URLs ej.: www.mysite.com/es/foo/bar | |
# NOTA: Si tambien quieres traducir las URL's usa la gema de Raul Murciano Translate_routes [2] (De momento sin cobertura para Rails3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#views/users/_form.html.erb | |
<%= simple_form_for @form do |f| %> | |
<%= f.error_notification %> | |
<%= f.input :name %> | |
<%= f.input :email %> | |
<h4> | |
<%= link_to_add_fields icon(:plus), |
OlderNewer