Skip to content

Instantly share code, notes, and snippets.

@frob
frob / .eslintignore
Created November 7, 2015 00:09
Drupal ESlint settings. Taken from https://www.drupal.org/node/1955232
core/assets/vendor/**/*
core/modules/locale/tests/locale_test.js
core/vendor/**/*
sites/**/files/**/*
libraries/**/*
sites/**/libraries/**/*
profiles/**/libraries/**/*
**/js_test_files/**/*
@frob
frob / custom_drupal.js
Last active October 14, 2015 20:56
a custom js implementation for drupal
/**
* @file
* Custom JS for a Drupal Module.
*/
(function ($) {
"use strict";
Drupal.behaviors.custom_custom = {
attach: function (context, settings) {
// End of attach.
@frob
frob / months.php
Created October 13, 2015 22:50
Long and short month names in a php array.
<?php
$short = array(
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
@frob
frob / emoji.php
Last active August 29, 2015 14:27 — forked from alanorth/emoji.php
Emoji class / function / variable names in PHP...
<?php
class 💩💩💩💩
{
function 💩💩💩($😎, $🐯)
{
return $😎 + $🐯;
}
}
$🐔 = 3;
@frob
frob / scrollTo.js
Last active February 2, 2023 14:37 — forked from james2doyle/scrollTo.js
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
// easing functions http://goo.gl/5HLl8
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
}
t--;
return -c/2 * (t*(t-2) - 1) + b;
};