Skip to content

Instantly share code, notes, and snippets.

@frob
frob / custom_drupal.js
Last active Oct 14, 2015
a custom js implementation for drupal
View custom_drupal.js
/**
* @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 Oct 13, 2015
Long and short month names in a php array.
View months.php
<?php
$short = array(
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
@frob
frob / emoji.php
Last active Aug 29, 2015 — forked from alanorth/emoji.php
Emoji class / function / variable names in PHP...
View emoji.php
<?php
class 💩💩💩💩
{
function 💩💩💩($😎, $🐯)
{
return $😎 + $🐯;
}
}
$🐔 = 3;
@frob
frob / scrollTo.js
Last active Aug 29, 2015 — forked from james2doyle/scrollTo.js
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
View scrollTo.js
// 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;
};