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 if (!defined('TL_ROOT')) die('You can not access this file directly!'); | |
/** | |
* TYPOlight webCMS | |
* Copyright (C) 2005-2009 Leo Feyer | |
* | |
* This program is free software: you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation, either | |
* version 2.1 of the License, or (at your option) any later version. |
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
window.addEvent('domready', function() { | |
var wq = new OVH('domains', 'result'); | |
$('chkdomain').addEvent('click', function( event ){ event.stop(); wq.checkdomain($('domain')); }); | |
}); |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
include FileUtils | |
def usage | |
puts <<EOS | |
usage: #{$0} glob-pattern from to | |
in all files matched by glob-pattern (classical shell | |
glob pattern), replace from (ruby regex) with to (ruby | |
substitution for gsub) |
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 | |
require( dirname( dirname( __FILE__ ) ) . '/lib/sfYaml.php' ); | |
$array = array( 'foo' => 'bar', 'other' => "I'm a bug" ); | |
var_dump( sfYaml::dump( $array ) ); | |
# output : | |
# string(29) "foo: bar | |
# other: 'I''m a bug' | |
# " |
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
$template['default']['regions'] = array( | |
'header' => array( | |
'content' => array('<h1>Welcome</h1>','<p>Hello World</p>'), | |
'name' => 'Page Header', | |
'wrapper' => '<div>', | |
'attributes' => array('id' => 'header', 'class' => 'clearfix') | |
) | |
); |
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
snippet feature Backend M | |
# language: fr | |
Fonctionnalité: Gérer les ${1:ressource}s | |
Afin de ${2:but} | |
En tant que ${3:role} | |
Je dois pouvoir ${4:moyen} | |
Contexte: je suis loggé en backend | |
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
; <<>> DiG 9.7.0-P1 <<>> www.toutfaire.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36905 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3 | |
;; QUESTION SECTION: | |
;www.toutfaire.com. IN A |
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
; <<>> DiG 9.7.0-P1 <<>> www.maquette.toutfaire.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44890 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3 | |
;; QUESTION SECTION: | |
;www.maquette.toutfaire.com. IN A |
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 cdm(){ | |
target="$1" | |
if [[ ! -d $target ]]; then | |
mkdir -p $target; | |
fi | |
cd $target | |
unset target | |
} |
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 | |
class Whatever extends Frontend | |
{ | |
public function getSomething( $aParam ) | |
{ | |
$template = new FrontendTemplate( 'mod_something' ); | |
$template->aParam = $aParam; | |
return $template->parse(); |