Skip to content

Instantly share code, notes, and snippets.

View tarto-dev's full-sized avatar
🎃
Never Gonna Give You Up 🎵

Clara C. tarto-dev

🎃
Never Gonna Give You Up 🎵
  • Conserto
  • Nantes, France
View GitHub Profile
SELECT
DISTINCT(node.nid) AS nid,
node.title AS node_title,
node_revisions.body AS node_revisions_body,
node_revisions.format AS node_revisions_format,
node_data_field_photo_carrousel_little.field_photo_carrousel_little_fid AS node_data_field_photo_carrousel_little_field_photo_carrousel_little_fid,
node_data_field_photo_carrousel_little.field_photo_carrousel_little_list AS node_data_field_photo_carrousel_little_field_photo_carrousel_little_list,
node_data_field_photo_carrousel_little.field_photo_carrousel_little_data AS node_data_field_photo_carrousel_little_field_photo_carrousel_little_data,
node.type AS node_type,
node.vid AS node_vid,
jQuery(function($){
$('#bilan_temoignage_box .prev').click(function(e) {
e.preventDefault();
var sizes = $('.slides').css('left').replace('px', '');
if(sizes == 0 || sizes == "auto") {
$( ".slides" )
.animate({ "left": "-840px" }, "slow" );
} else {
$( ".slides" )
.animate({ "left": "+=210px" }, "slow" );
<?php
function fromStringToUTF8($str){
return htmlentities(mb_convert_encoding($str,"ISO-8859-1","UTF-8"));
}
<div class="listeBilan inner_text">
<div class="q_bloc">
<div class="sstitreEtapeB">
<div class="numeroQuestions">1.1</div>
<div class="titreQuestions">Précisez les informations suivantes :</div>
</div>
<div class="questionBilan">
<div class="textsexe">Vous êtes :
<?php if (isset($_SESSION['Tabform'][$sessionId]['sexe']) && $_SESSION['Tabform'][$sessionId]['sexe'] == 'Homme') { ?>
<label for="sexe"><input type="radio" id="sexe" name="sexe" value="Homme" checked="true"/> Homme </label>
<?php
$aAccordeonsTexts = array(
'origin' => array(
array(
'title' => "J'observe mon comportement alimentaire",
'content' => "Je définis : « trop manger » <br />
Je remplis mon carnet découverte <br />
J'apprends la respiration en pleine conscience<br />"
),
// [...]
@tarto-dev
tarto-dev / .bashrc
Last active August 29, 2015 14:05
Promp with Git
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\e[00;32m\]\A\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;33m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[00;33m\]\h\[\e[0m\]\[\e[01;32m\]:\[\e[0m\]\[\e[00;36m\][\w]:\[\e[0m\]\[\e[00;37m\]\[\e[0m\] \[\033[1;32m\]\$(parse_git_branch)\[\033[0;37m\] \\$ "

Output generated by typing "php bench >> output"

SPRINTF: 0.32848882675171

CONCAT: 0.21326398849487

SPRINTF: 0.33184599876404

<?php
function yourtheme_theme() {
$items = array();
$items['user_login'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'yourtheme') . '/templates',
'template' => 'user-login',
'preprocess functions' => array(
'yourtheme_preprocess_user_login'
),
<?php
if (arg(0) == 'user') {
switch (arg(1)) {
case 'register':
drupal_set_title(t('New Accounts'));
break;
case 'password':
drupal_set_title(t('Retrieve Password'));
break;
object(Hybrid_User_Profile)[349]
public 'identifier' => int 274970767
public 'webSiteURL' => string 'http://t.co/ZI8RzEAvAw' (length=22)
public 'profileURL' => string 'http://twitter.com/Benftwc' (length=26)
public 'photoURL' => string 'http://pbs.twimg.com/profile_images/499865941094567938/RqNcayhT.png' (length=67)
public 'displayName' => string 'Benftwc' (length=7)
public 'description' => string 'Chevaucheur de licornes à paillettes chez @JoliCode- Git for the win - #teamUnicorn' (length=84)
public 'firstName' => string 'Benjamin CASSINAT' (length=17)
public 'lastName' => null
public 'gender' => null