Apple script and automator

on run {input, parameters}
	# http://macbiblioblog.blogspot.nl/2014/12/key-codes-for-function-and-spec...	tell application "System Events"
		# Symbol	Code
		# Zero	0	29
		# One	1	18
		# Two	2	19
		# Three	3	20
		# Four	4	21
		# Five	5	23
		# Six	6	22
		# Seven	7	26
		# Eight	8	28
		# Nine	9	25
		key code 21 using {control down}

		#		key code 20 using {control down}
		#		key code 21 using {control down}
		key code 18 using {control down}

Fix git apply empty result using patch

http://marymaking.blogspot.nl/2009/11/falling-back-into-space-portraits.html

When applying a patch using git it sometimes fails. Then fallback on to the patch command.

Delete and edit comments on closed node

Node closed comment delete

Having a forum you needs quick deletions of improper comments.

In Drupal 7 and Drupal 8 you have to visit admin/content/comments to do so. But then you loose the thread.

You could review and use this patch or add this to your custom module. The first needs review and testing. The later needs a Drupal coder.

Configuration Management

Drupal 8 has a nice configuration system but what works how?

Workflow

https://www.drupal.org/documentation/administer/config

You cannot import configuration from an alien site

Sites are equal when their system.site.uuid are equal.

drush @drupal.d8 config-get system.site

You may try to force this with

Replace file path using Aegir

drush --debug php-script replace
<?php
include '/var/aegir/.drush/provision/platform/drupal/deploy_7.inc';
$new_url = 'gpbase.nl';
_provision_platform_drupal_deploy_7_replace('default', $new_url);

Installing CyanogenMod on Samsung SII Plus

Samsung S II Plus === GI-I9105P

Bootload 4.2.2 ?

Unofficial release 11 M 12 (20141113)

adb push ~/Downloads/.. /sdcard/...
adb reboot recovery
apply update from external storage

Cyanogenmod on Mac

The site

http://www.cyanogenmod.org/

The instructions

Click the 'Get started button'

Install the Mac OSX installer

This is hidden somewhere somehow.

Google plus community

https://plus.google.com/communities/100663046352711689172

The 'About this community' box has a link to cminstaller-mac-beta.zip which seems to be from 2014-05-08

Some troubles

http://forum.cyanogenmod.org/topic/86396-mac-installer-beta-released/

Angular Drupal Jam

CORS

http://enzolutions.com/articles/2014/09/08/how-to-enable-cors-requests-against-drupal-8/

Trust Drupal

http://stackoverflow.com/questions/9381926/insert-html-into-view-using-angularjs

Service

http://stackoverflow.com/questions/23074875/factory-and-service-in-angularjs

Decoupling

http://twofuckingdevelopers.com/2014/06/angularjs-best-practices-001-constants/

End to end testing

https://docs.angularjs.org/guide/e2e-testing

Create an empty pristine branch in your git repo

In need for a new empty branch for restarting an idea I need a empty branch

git checkout --orphan NEWBRANCH
git rm -rf .

don't do the commands in reverse order. don't forget the rm -rf command either.

Resource

http://bitflop.com/tutorials/how-to-create-a-new-and-empty-branch-in-git.html