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
<?php | |
/** | |
* overwrite theme_views_view_list | |
* | |
* Group more than one fields in a view | |
* | |
*/ | |
function template_views_view_list__VIEWNAME($view, $group, $row) { | |
//the field we want to group |
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
[client] | |
port = 3306 | |
socket = /tmp/mysql.sock | |
[mysqld] | |
bind-address = 127.0.0.1 | |
port = 3306 | |
socket = /tmp/mysql.sock | |
max_allowed_packet = 64M | |
table_cache = 4096 | |
sort_buffer_size = 2M |
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
<form onsubmit="document.location.href=document.searchform.action+'#o%3As%3Ds%253Aresource%5Ef%3Do%253Aresource%253Do%25253Aterms%25253Ds%2525253A'+escape(escape(escape(escape((jQuery('#curriki-searchbox').val() !=='recherche')?jQuery('#curriki-searchbox').val()'')))); return false;" action="http://planete.sankore.org/xwiki/bin/view/Search/" class="search-box" name="searchform" id="searchform"> | |
<input type="hidden" value="" name="area" class="hidden"> | |
<input type="text" onblur="if (this.value=='') this.value='recherche'" onfocus="if (this.value=='recherche') this.value=''; else this.select()" value="recherche" class="input" name="brsqry" id="curriki-searchbox"> | |
<button name="btn" id="searchbtn" type="submit">Aller</button> | |
</form> |
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
<?php | |
abstract class SkCommonMigration extends Migration { | |
public function __construct() { | |
parent::__construct(); | |
//$this->addFieldMapping('field_tags', 'tags'); | |
} | |
/** |
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
# Last modified: 2011 Oct 30 | |
# Author: Simon Perdrisat | |
#### Binds | |
# Prefix | |
unbind C-b | |
set-option -g prefix C-a | |
bind a send-prefix | |
# Last active window |
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
Some of the regex I think useful... | |
#That will match all blank lines except if the line is the very last line in the file. | |
^\s*[\r\n]+ | |
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
# Using version 4 of drush http://drush.ws/help | |
drush dl drupal | |
mv drupal-7.10 d7.dev | |
cd d7.dev | |
drush site-install standard --db-url=mysql://user:passwd@localhost/og --db-su=root --db-su-pw= --site-name=D7-Dev |
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
## Tested on Drupal 7 | |
## On frontpage redirect to /fr if the browser language start with fr | |
RewriteCond %{HTTP:Accept-Language} ^fr.*$ [NC] | |
RewriteCond %{REQUEST_URI} ^/$ [NC] | |
RewriteCond %{QUERY_STRING} !(^q\=) [NC] | |
RewriteRule ^(.*)$ /fr [L,R=302] |
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
SBB / CFF API mobile | |
xmlfahrplan.sbb.ch 194.150.245.139 | |
Apparently this is the same crapy API than Deutsche Bahn. | |
### Client: POST xmlfahrplan.sbb.ch/bin/extxml.exe | |
<?xml version="1.0" encoding="iso-8859-1"?> |
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
// mixin than I miss in twitter bootstrap | |
// Convert px to em | |
// For default context use the same value than @baseFontSize but without unit | |
.font-size( @target: @basefont, @context: 13 ) { | |
font-size: (@target / @context) + 0em; | |
} |