Skip to content

Instantly share code, notes, and snippets.

Pascal Duez pascalduez

Block or report user

Report or block pascalduez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pascalduez
pascalduez / html.tpl.php
Created Dec 1, 2011
Drupal 7 — HTML5 html.tpl.php
View html.tpl.php
<!DOCTYPE html>
<html<?php print $html_attributes; ?>>
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
</head>
<body<?php print $body_attributes;?>>
@pascalduez
pascalduez / html.tpl.php
Created Dec 1, 2011
Drupal 7 — Move $scripts at page bottom
View html.tpl.php
<!DOCTYPE html>
<html<?php print $html_attributes; ?>>
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $head_scripts; ?>
</head>
<body<?php print $body_attributes;?>>
@pascalduez
pascalduez / demo.js
Created Dec 24, 2011
Drupal 7 — Basic Ajax request (manual)
View demo.js
/**
* @file demo JS.
* jQuery 1.5+
*/
(function( $ ) {
// On DOM ready
$(function() {
@pascalduez
pascalduez / demo.module
Created Dec 24, 2011
Drupal 7 — Basic Ajax request (Ajax framework)
View demo.module
<?php
/**
* @file
* Demo module, Basic Ajax request (Ajax framework).
*/
/**
* Implements hook_menu().
*/
@pascalduez
pascalduez / demo.module
Created Dec 24, 2011
Drupal 7 — Basic Ajax form submit (Ajax framework)
View demo.module
<?php
/**
* @file
* Demo module, Basic Ajax form submit (Ajax framework).
*/
/**
* Implements hook_menu().
*/
@pascalduez
pascalduez / Fetch.sublime-settings
Created Feb 17, 2012 — forked from dustinhorton/Fetch.sublime-settings
fetch settings for sublime text 2
View Fetch.sublime-settings
{
"files":
{
"backbone": "https://raw.github.com/documentcloud/backbone/master/backbone.js",
"history": "https://raw.github.com/balupton/history.js/master/scripts/compressed/history.js",
"jquery": "http://code.jquery.com/jquery.js",
"jquery-cookie": "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
"jquery-dotimeout": "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
"jquery-extra-selectors": "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js",
"jquery-flexslider": "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
@pascalduez
pascalduez / modulename.module
Created Feb 22, 2012
Drupal 7 - Add a cancel button on node forms
View modulename.module
<?php
/**
* Implements hook_form_alter().
*/
function modulename_form_alter(&$form, &$form_state, $form_id) {
// You might want to filter by content type.
if ($form_id == 'ctype_node_form') {
// Add a cancel button.
$form['actions']['cancel'] = array(
@pascalduez
pascalduez / webcamlapse.js
Created Nov 6, 2012
Webcam auto timelapse
View webcamlapse.js
#!/usr/bin/env node
var http = require('http')
, url = require('url')
, path = require('path')
, fs = require('fs')
, async = require('async')
, exec = require('child_process').exec
, imgUrl
, options
@pascalduez
pascalduez / template.tpl.php
Last active Dec 22, 2015
Drupal 7 — Default page template with panels
View template.tpl.php
<?php
/**
* Helper function to test for panel page config.
*/
function _is_panel_page() {
$page = &drupal_static(__FUNCTION__);
if (function_exists("page_manager_get_current_page")) {
if (!isset($page)) {
View doNotTrack.md

Do Not Track

Implementations across browsers and JavaScript access.

Chrome

window.navigator.doNotTrack

setting: "Send a ‘Do Not Track’ request with your browsing traffic"
return: [ "1" or null ]

You can’t perform that action at this time.