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 / SassMeister-input.scss
Last active Jul 30, 2019
Some Sass string functions: capitalize, ucwords, camelize, ...
View SassMeister-input.scss
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Capitalize string
// --------------------------------------------------------------------------------
// @param [string] $string
// --------------------------------------------------------------------------------
// @return [string]
@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 / SassMeister-input.scss
Created Apr 27, 2014
Sass, testing for empty values.
View SassMeister-input.scss
// ----
// Sass (v3.3.5)
// Compass (v1.0.0.alpha.18)
// ----
// testing for empty values
// In Sass "", 0, () evaluate to true...
@function empty($value) {
@if not $value
@pascalduez
pascalduez / SassMeister-input.scss
Last active Apr 12, 2019
Prime number in Sass.
View SassMeister-input.scss
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
// Prime number
// https://en.wikipedia.org/wiki/Prime_number
// Returns whether `$n` is a prime number.
@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 / index.md
Last active Jan 1, 2019
Github page over HTTPS, setting up a custom domain at Gandi
View index.md

Github page over HTTPS, setting up a custom domain at Gandi

DNS configuration

With an apex domain

@ 10800 IN A 185.199.108.153
@ 10800 IN A 185.199.109.153
@ 10800 IN A 185.199.110.153
@pascalduez
pascalduez / SassMeister-input.scss
Last active Oct 19, 2018
JavaScript `toString` and `parseInt` implementation in Sass.
View SassMeister-input.scss
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// JavaScript `toString` and `parseInt` implementation in Sass.
@function pow($num, $exp) {
$result: 1;
@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(
You can’t perform that action at this time.