Skip to content

Instantly share code, notes, and snippets.

Alex Schedrov Sanchiz

View GitHub Profile
@Sanchiz
Sanchiz / setup.md
Created Oct 16, 2018 — forked from shashankmehta/setup.md
Setup PHP and Composer on OSX via Brew
View setup.md

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
View mac-php-composer-setup.md
View gist:ca5e0596a8417536c2b56c06c4f39bff
2.2.x
Name : Sam
Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw==
3.3.x
Username: personal
eJzzzU/OLi0odswsqilILSrOz0vMqbFEAjXONYY1fu6ufgA/CA4X
@Sanchiz
Sanchiz / 9191_config.php
Created Aug 16, 2016
This is a sample addition to the config.php for SimpleSAMLphp for Acquia Cloud.
View 9191_config.php
<?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',
View pedantically_commented_playbook.yml
---
# ^^^ 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.
View gist:2e5f8ac53ff7c9230d21

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

View osx_php_homebrew.setup.md

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
View localStorage.js
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;}
View gist:8828278
<?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.
@Sanchiz
Sanchiz / gist:7627657
Last active Dec 29, 2015
usertools.drush.inc Examples of Drush extension.
View gist:7627657
<?php
/**
* @file
* User tools.
*/
/**
* Implements hook_drush_command().
*/
function usertools_drush_command() {
You can’t perform that action at this time.