Skip to content

Instantly share code, notes, and snippets.

View lsolesen's full-sized avatar

Lars Olesen lsolesen

View GitHub Profile
<?php
/*
* PEL: PHP Exif Library. A library with support for reading and
* writing all Exif headers in JPEG and TIFF images using PHP.
*
* Copyright (C) 2004, 2006, 2007 Martin Geisler.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@lsolesen
lsolesen / create-platforms.sh
Created March 6, 2016 09:28
Script to create platforms on VIH
#!/bin/bash
DATE=$1
echo $DATE
drush make https://raw.githubusercontent.com/vih/vih-build/7.x-1.x/build-vih.make vih-$DATE
@lsolesen
lsolesen / setup.sh
Last active April 26, 2016 07:23
Setup script for G2 boxes on Codio for running a Drupal install
##########################################################################
#### Script to setup Codio box for Drupal development
##########################################################################
#### Instructions
#### From the Codio Dashboard, create a new Empty template project.
#### Open a Terminal window from the Tools->Terminal window
#### Copy the contents of this file to a file called 'setup.sh' in the root of your machines file system
@lsolesen
lsolesen / gist:8e38ebbc7201d8f8378e
Created June 9, 2015 07:54
Returns render array to be printed out whereever
function mglaman_social_links() {
$social_links = array(
'twitter' => array(
'title' => t('Twitter'),
'href' => 'https://twitter.com/nmdmatt'
),
'linkedin' => array(
'title' => t('LinkedIn'),
'href' => 'http://www.linkedin.com/in/mattglaman',
),
<?php
/**
* @file
* Default theme implementation to display a single Drupal page.
*
* @see template_preprocess()
* @see template_preprocess_page()
* @see template_process()
* @see html.tpl.php
@lsolesen
lsolesen / setup.sh
Last active August 29, 2015 14:04
Script to setup Codio box easily to use with drupal development.
##########################################################################
#### Script to setup Codio box for Drupal development
##########################################################################
#### Instructions
#### From the Codio Dashboard, create a new Empty template project.
#### Open a Terminal window from the Tools->Terminal window
#### Copy the contents of this file to a file called 'setup.sh' in the root of your machines file system
<?php
/**
* @file
*/
/**
* Plugin definition.
*/
$plugin = array(
'vih_link_button' => array(
<?php
/**
* @file
*/
/**
* Add panopoly featured_image field instead of the field_profile_picture
*/
function vih_employees_update_7000() {
$module = 'vih_employees';
@lsolesen
lsolesen / commerce_kickstart_migrate.migrate.inc.php
Last active August 29, 2015 14:00
Create product discount for commerce kickstart 2.x
<?php
class CommerceKickstartDiscounts extends CommerceKickstartMigration {
public function __construct() {
parent::__construct();
$this->description = t('Import discounts.');
// Create a map object for tracking the relationships between source rows
$this->map = new MigrateSQLMap($this->machineName,
array(
Index: js/jquery.pwi.js
===================================================================
--- js/jquery.pwi.js (revision 340)
+++ js/jquery.pwi.js (working copy)
@@ -293,7 +293,7 @@
else {
$html.append("<a class='" + (settings.popupPlugin === "fancybox" ?
"fancybox.iframe" : "iframe") +
- "' href='http://www.youtube.com/embed/" + $youtubeId +
+ "' href='//www.youtube.com/embed/" + $youtubeId +