Skip to content

Instantly share code, notes, and snippets.

View Signum's full-sized avatar

Christoph Haas Signum

View GitHub Profile
@Signum
Signum / gist:1125013
Created August 4, 2011 11:42
Tracebacks after Apache benchmark
ab -t 10 -c 100 http://127.0.0.1:8080/
2011-08-04 13:37:26,638 INFO [paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (2 working, 8 idle, 0 starting) ave time 0.00sec, max time 0.00sec, killed 0 workers
2011-08-04 13:37:26,806 INFO [paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (2 working, 8 idle, 0 starting) ave time 0.00sec, max time 0.00sec, killed 0 workers
2011-08-04 13:37:26,976 INFO [paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (3 working, 7 idle, 0 starting) ave time 0.00sec, max time 0.00sec, killed 0 workers
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 38995)
Traceback (most recent call last):
File "/home/chaas/projekte/webcore/foo/lib/python2.6/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
self.finish_request(request, client_address)
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7ukJk85DYCGi8e6qaF6G3aOp1javK0878D9iqX1ktXPKubZoKwzJFvgSuSAj4wBGiSChle9rnBh8vDp5caXao1jTohUjdlkEHNrS8W68w9PEiy24fTCXdXxcoR9g78hv97Xu9BtakK8PuD9h31x+THjw4tcPF/6klIJqs0VswePQsusDS6rSHdN7l2+8eJmSNNOGATRFzPev6VpjorDHA9EuzcUWnI9JqDQgt1Qb2t+kB3SPWOfJnsDyjiU6WpQlmhrAlsWVzruxGDZjmsE4u9ol/yQQccd5IeUDXGoyAU3rVzpALxJ1alDgsVxkux6UE0darBM+ZIIaIY9v3s46SQ==
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7ukJk85DYCGi8e6qaF6G3aOp1javK0878D9iqX1ktXPKubZoKwzJFvgSuSAj4wBGiSChle9rnBh8vDp5caXao1jTohUjdlkEHNrS8W68w9PEiy24fTCXdXxcoR9g78hv97Xu9BtakK8PuD9h31x+THjw4tcPF/6klIJqs0VswePQsusDS6rSHdN7l2+8eJmSNNOGATRFzPev6VpjorDHA9EuzcUWnI9JqDQgt1Qb2t+kB3SPWOfJnsDyjiU6WpQlmhrAlsWVzruxGDZjmsE4u9ol/yQQccd5IeUDXGoyAU3rVzpALxJ1alDgsVxkux6UE0darBM+ZIIaIY9v3s46SQ==
@Signum
Signum / gist:5042709
Created February 26, 2013 22:06
First migration with different table name
class CreateMailusers < ActiveRecord::Migration
def change
create_table :virtual_users do |t|
t.string :email
t.string :password
t.timestamps
end
end
end
@Signum
Signum / gist:5042728
Created February 26, 2013 22:08
DB creation
chaas@aldi:~/projekte/ror/ispmailadmin$ rake db:drop
chaas@aldi:~/projekte/ror/ispmailadmin$ rake db:setup
-- create_table("domains", {:force=>true})
-> 0.0603s
-- create_table("mailaliases", {:force=>true})
-> 0.0423s
-- create_table("mailusers", {:force=>true})
-> 0.0274s
-- initialize_schema_migrations_table()
-> 0.0586s
@Signum
Signum / gist:5365778
Created April 11, 2013 18:12
Weird routing problem…
$ rake routes
domains GET /domains domains#index
POST /domains domains#create
new_domain GET /domains/new domains#new {:domain=>/[0-z\.\-]+/}
edit_domain GET /domains/:domain/edit domains#edit {:domain=>/[0-z\.\-]+/}
domain /domains/:domain(.:format) domains#show
PUT /domains/:domain domains#update {:domain=>/[0-z\.\-]+/}
DELETE /domains/:domain domains#destroy {:domain=>/[0-z\.\-]+/}
mailusers GET /domains/:domain/mailusers mailusers#index {:domain=>/[0-z\.\-]+/, :email=>/[0-z\.\-_@]+/}
POST /domains/:domain/mailusers mailusers#create {:domain=>/[0-z\.\-]+/, :email=>/[0-z\.\-_@]+/}
@Signum
Signum / gist:7695611
Created November 28, 2013 17:36
Trying to get phrase suggest ("did you mean") queries working
Example document:
{
_index: debshots
_type: jdbc
_id: 15808
_version: 172
_source: {
description: Children's game based on the "memory" card game
name: lmemory
Failed to execute the [velocity] macro. Click on this message for details.org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#if ($xcontext.action == 'get')
#updateDocTreeConfigFromRequest
#handleDocumentTreeRequest
#end]
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:50)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:286)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:269)
$ LANG=C rdisc6 wlan0
Soliciting ff02::2 (ff02::2) on wlan0...
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : Yes
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 1800 (0x00000708) seconds
root@gw:/var/dhcpd/etc # cat dhcpd
dhcpd.conf dhcpdv6.conf
root@gw:/var/dhcpd/etc # cat dhcpdv6.conf
option domain-name "home.workaround.org";
option ldap-server code 95 = text;
option domain-search-list code 119 = text;
default-lease-time 7200;
max-lease-time 86400;
log-facility local7;