Skip to content

Instantly share code, notes, and snippets.

View telesma's full-sized avatar

Frank Rossi telesma

View GitHub Profile
@telesma
telesma / gist:c69e561004c2ec9343378141051a4880
Created March 21, 2017 17:53 — forked from dsibilly/gist:2992412
Node.js clustered HTTP server example
(function () {
'use strict';
var cluster = require('cluster'),
http = require('http'),
os = require('os'),
/*
* ClusterServer object
@telesma
telesma / Craft CMS SEO Meta
Created February 1, 2016 05:59 — forked from bryandugan/Craft CMS SEO Meta.twig
Craft CMS SEO Meta Tags
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="{{ siteUrl }}favicon.png">
<title>{% if homeTitle is defined %}{{ siteName }} | {{ entry.homeTitle }}{% elseif entry.title is defined %}{{ entry.title }} | {{ siteName }}{% else %}{{ title }} | {{ siteName }}{% endif %}</title>
<link rel="stylesheet" href="{{ siteUrl }}assets/css/app.css" />
<script src="{{ siteUrl }}assets/bower_components/modernizr/modernizr.js"></script>
<!-- General Page Meta -->
{% if entry.seoDescription is defined %}
{% if entry.seoDescription is not empty %}
@telesma
telesma / Craft CMS Meta
Created February 1, 2016 05:58
Craft CMS Basic Meta Information
<!-- General Page Meta -->
{% if entry.seoDescription is defined %}
{% if entry.seoDescription is not empty %}
<meta name="description" content="{{ entry.seoDescription }}">
{% endif %}
{% endif %}
{% if entry.seoKeywords is defined %}
{% if entry.seoKeywords is not empty %}
<meta name="keywords" content="{{ entry.seoKeywords }}">
{% endif %}
<div id="browserUpdate" class="browserUpdate overlay">
<a href="#" class="overlay-close js-close"><i class="icn-x icon-box -rev"></i></a>
<div class="view view-directory swiper-container browserUpdate-container">
<div class="swiper-slide">
<div class="row cf">
<div class="col-18 ac ci browserUpdate-info">
<img class="browserUpdate-warning-icon" src="/sites/all/themes/adu/assets/media/img/optimized/browserUpdate/warning.png" alt="warning icon">
<h4>Did you know your browser is out of date?</h4>
<p>To get the best possible experience using our website we recommend that you upgrade to a newer version or other web broswer. A list of the most popular web browsers can be found below. </p>
<p><strong>By closing this window you acknowledge that your experience on this website may be degraded.</strong></p>
@telesma
telesma / diffList.js
Last active August 29, 2015 14:18 — forked from amcdnl/diffList.js
define(['angular'], function(angular) {
// add a few helpers
Array.prototype.union = function(a){
var r = this.slice(0);
a.forEach(function(i) { if (r.indexOf(i) < 0) r.push(i); });
return r;
};
Array.prototype.diff = function(a){
@telesma
telesma / diffList.js
Last active August 29, 2015 14:18 — forked from katowulf/diffList.js
/**
* A diff utility that compares arrays and returns a list of added, removed, and updated items
*
* Returns an object with two methods:
* diff: do a one-time diff of two arrays
* watch: observe a variable on scope and report any changes to a callback
*
* Invoking the factory is done like so:
* <code>
* function(listDiff) {
/*
Script: Date.German.js
Date messages for German. Thanks Frank Rossi.
License:
MIT-style license.
*/
MooTools.lang.set('DE', 'Date', {
/*
Script: FormValidator.German.js
Date messages for German. Thanks Frank Rossi.
License:
MIT-style license.
*/
MooTools.lang.set('DE', 'FormValidator', {