Skip to content

Instantly share code, notes, and snippets.

View myabc's full-sized avatar

Alexander Brandon Coles myabc

  • London, England
  • 06:42 (UTC +01:00)
View GitHub Profile
@bumi
bumi / gist:27085
Created November 20, 2008 16:03
fakebug - don't let console.log break your code on browsers without firebug
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(); }
anonymous
anonymous / gist:601724
Created September 28, 2010 20:32
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;
}
}
}
#!/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

10 Ways to improve Github Issues

I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority:

1. I should be able to pick the assignee and milestone via keyboard when creating a new ticket

2. Keyboard shortcuts should work everywhere. E.g. when viewing an existing issue, 'c' does not work.

3. After creating an issue, the assigned user / milestone should be remembered and pre-filled.

4. Allow assigning a different user while commenting. Right now this deletes my half-typed comment.

5. When typing the @ symbol to mention somebody, it should auto-complete the name.

6. Things feel a little sluggish right now, any speed improvements would be very welcome.

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
@bumi
bumi / psych_yml_tester.rb
Created June 7, 2011 09:53 — forked from jhilden/yamltester.rb
YAML tester
# 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]
@kilaulena
kilaulena / gist:2561283
Created April 30, 2012 18:56
Drilling in your wall and not in cables
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.
@andresgutgon
andresgutgon / Selector de Idioma con Rails 2.3.8
Created August 18, 2010 18:31
Desplegar los idiomas que estan disponibles en tu App y setear el valor para cada usuario
#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)
@fran-worley
fran-worley / _form.html.erb
Last active October 23, 2017 23:42
A working example of nested forms just using Reform.
#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),