Skip to content

Instantly share code, notes, and snippets.

<?php
module_load_include('inc', 'ctools', 'includes/export');
// Load base enpoint and adding config for new subsite.
$base_taxonomy_endpoint = multisite_indicator_server_deploy_endpoints_default();
$endpoint = $base_taxonomy_endpoint['base_taxonomy_endpoint'];
$endpoint_url = $term->field_domain[LANGUAGE_NONE][0]['url'] . '/' . $endpoint->service_config['url'];
// Create machine name.
AZHU.storage = {
save : function(key, jsonData, expirationMin){
if (!Modernizr.localstorage){return false;}
var expirationMS = expirationMin * 60 * 1000;
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS}
localStorage.setItem(key, JSON.stringify(record));
return jsonData;
},
load : function(key){
if (!Modernizr.localstorage){return false;}

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
<?php
/**
* @file
* Example block
*/
/**
* Implements hook_block_info().
*/
function example_block_block_info() {
@Sanchiz
Sanchiz / gist:7456469
Last active December 28, 2015 06:19 — forked from jimbojsb/gist:1630790

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@Sanchiz
Sanchiz / gist:7627657
Last active December 29, 2015 06:18
usertools.drush.inc Examples of Drush extension.
<?php
/**
* @file
* User tools.
*/
/**
* Implements hook_drush_command().
*/
function usertools_drush_command() {
@Sanchiz
Sanchiz / 9191_config.php
Created August 16, 2016 05:43
This is a sample addition to the config.php for SimpleSAMLphp for Acquia Cloud.
<?php
// All custom changes below. Modify as needed.
// Defines account specific settings.
// $ah_options['database_name'] should be the Acquia Cloud workflow database name which
// will store SAML session information.set
// You can use any database that you have defined in your workflow.
// Use the database "role" without the stage ("dev", "stage", or "test", etc.)
//This file was last modified on Nov 4, 2015.
$ah_options = array(
'database_name' => 'mydatabasename',
@Sanchiz
Sanchiz / gist:ca5e0596a8417536c2b56c06c4f39bff
Created April 4, 2017 18:08
Balsamiq Mockups keys for mac
2.2.x
Name : Sam
Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw==
3.3.x
Username: personal
eJzzzU/OLi0odswsqilILSrOz0vMqbFEAjXONYY1fu6ufgA/CA4X