Skip to content

Instantly share code, notes, and snippets.

View mikl's full-sized avatar

Mikkel Høgh mikl

View GitHub Profile
-- Select the fields we need.
SELECT u.uid AS uid,
u.name AS username,
TRIM(n.title) AS real_name,
ctp.field_profile_nametag_value AS nametag_name,
ctp.field_profile_company_value AS company,
ctp.field_profile_drupal_value AS drupal_org_name,
ctp.field_profiler_do_uid_value AS drupal_org_uid,
ctp.field_profiler_twitter_value AS twitter_name,
ctp.field_profile_country_value AS country,
<?php
// $Id$
/**
* @file
* This is a dump of the session node type from the DrupalCon Copenhagen site.
*/
$content['type'] = array (
<?php
/*
THE EMOGRIFIER LICENSE
Copyright (c) 2008-2011 Pelago (http://www.pelagodesign.com/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@mikl
mikl / setISODate.js
Created November 28, 2011 22:20
This illustrates pretty well why Date is my least favorite part of JavaScript…
if (typeof Date.prototype.setISODate !== 'function') {
// Crude validation for the date input.
var dateValidator = /^\d\d\d\d-[01]\d-[0-3]\d$/;
/**
* Set date from a ISO-formatted string, ie. 2011-11-28.
*/
Date.prototype.setISODate = function (input) {
if (dateValidator.test(input)) {
var parts = input.split('-');
@mikl
mikl / keybase.md
Last active September 11, 2019 06:00

Keybase proof

I hereby claim:

  • I am mikl on github.
  • I am mikl (https://keybase.io/mikl) on keybase.
  • I have a public key ASAIWHSQKo6M5T4c3YhvSvdtldwPqEjRecLbvOrUQ7y3uwo

To claim this, I am signing this object: