Skip to content

Instantly share code, notes, and snippets.

@sids
sids / README
Created July 24, 2008 12:20
Perl: database handling examples
http://gist.github.com/2125
Examples of database handling in Perl.
* Homepage: communities: top groups:
3. critical car?
top contributers? nicht contributors?
* Homepage: Conditions:
der grosse 'conditions'titel braucht zu lange zum laden
* Homepage: treatments:
warum werden in conditions die 30 most popular gezeigt und in den treatments nur die top 10?
Und warum sind die conditions normal geschrieben und die treatments gross?
* Homepage: directorz:
top searched ????
@gijs
gijs / gist:2131
Created July 24, 2008 12:56
Testing gist
urlpatterns += patterns('project.website.views',
url(r'^client/$', 'client', name='client'),
url(r'^signin/$', 'signin', name='signin'),
url(r'^signout/$', 'signout', name='signout'),
url(r'^zoeken/$', 'search', name='search'),
url(r'^(?P<slug>.*)/(?P<subslug>.*)/$', 'subpage', name='subpage'),
url(r'^(?P<slug>.*)/$', 'page', name='page'),
url(r'^$', 'index', name='homepage'),
)
diff --git a/app/views/communities/view.ctp b/app/views/communities/view.ctp
index c291269..21685ce 100644
--- a/app/views/communities/view.ctp
+++ b/app/views/communities/view.ctp
@@ -12,17 +12,17 @@
</div>
<div id="related_drug_classes">
- <?php echo $this->element('community_related_drug_classes'); ?>
+ <?php echo $this->element('communities/treatment_classes'); ?>
diff --git a/app/views/communities/view.ctp b/app/views/communities/view.ctp
index c291269..21685ce 100644
--- a/app/views/communities/view.ctp
+++ b/app/views/communities/view.ctp
@@ -12,17 +12,17 @@
</div>
<div id="related_drug_classes">
- <?php echo $this->element('community_related_drug_classes'); ?>
+ <?php echo $this->element('communities/treatment_classes'); ?>
diff --git a/app/views/communities/view.ctp b/app/views/communities/view.ctp
index c291269..21685ce 100644
--- a/app/views/communities/view.ctp
+++ b/app/views/communities/view.ctp
@@ -12,17 +12,17 @@
</div>
<div id="related_drug_classes">
- <?php echo $this->element('community_related_drug_classes'); ?>
+ <?php echo $this->element('communities/treatment_classes'); ?>
find . -type f -name "*.ctp" -print0 | xargs -0 sed -i '' 's/community_related_drug_classes/communities\/treatment_classes/g
/* cross-browser min-width and min-height */
.width {
min-width:100px;
width: auto !important;
width: 100px;
}
.height {
@yosmoc
yosmoc / gist:2155
Created July 24, 2008 14:11
rm_hatenagraph.rb
# -*- coding: utf-8 -*-
require 'mechanize'
require 'pit'
require 'uri'
pit = Pit.get('hatena', :require => {
'username' => 'username',
'password' => 'password'})
BASE = URI("http://graph.hatena.ne.jp/#{pit['username']}/")
0000000: 3c3f 7068 7020 246a 6176 6173 6372 6970 <?php $javascrip
0000010: 742d 3e6c 696e 6b28 276d 656d 6265 725f t->link('member_
0000020: 7365 6172 6368 5f66 6f72 6d27 293b 203f search_form'); ?
0000030: 3e0a 3c68 313e 5065 6f70 6c65 3c2f 6831 >.<h1>People</h1
0000040: 3e0a 3c64 6976 2069 643d 2272 6967 6874 >.<div id="right
0000050: 636f 6c22 3e0a 093c 3f70 6870 2065 6368 col">..<?php ech
0000060: 6f20 2474 6869 732d 3e65 6c65 6d65 6e74 o $this->element
0000070: 2827 2e2e 2f75 7365 7273 2f66 696e 645f ('../users/find_
0000080: 615f 6d65 6d62 6572 2729 3f3e 0a09 3c3f a_member')?>..<?
0000090: 7068 7020 6563 686f 2024 7468 6973 2d3e php echo $this->