start new:
tmux
start new with session name:
tmux new -s myname
name = VoxPelli OAuth Test | |
core = 7.x | |
dependencies[] = oauth_common | |
dependencies[] = http_client |
#!/bin/sh | |
# any2pandoc.sh | |
# | |
# A shell script that tries its best to convert documents thrown at it | |
# to pandoc's extended markdown. | |
# | |
# https://gist.github.com/1181510 | |
# | |
# Depends on: |
<?php | |
/** | |
* Implements hook_page_alter(). | |
*/ | |
function mytheme_page_alter(&$page) { | |
// Remove all the region wrappers. | |
foreach (element_children($page) as $key => $region) { | |
if (!empty($page[$region]['#theme_wrappers'])) { | |
$page[$region]['#theme_wrappers'] = array_diff($page[$region]['#theme_wrappers'], array('region')); |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/usr/bin/php | |
<?php | |
/** | |
* Utility a script that will loop through feed nodes of a given importer and, | |
* in a performant way, re-import them all. | |
* | |
* Usage: feeds-bulk-import @site-alias importer_name | |
*/ |
<?php | |
class MyMigration extends Migration { | |
public $base_dir; | |
/** | |
* Constructor. | |
*/ | |
public function __construct() { | |
parent::__construct(); |
Install Homebrew:
Tap the wonderful homebrew-php from https://github.com/Homebrew/homebrew-php
$ brew tap homebrew-php
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array
it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array
part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
Edit the Apache2 plist file with whatever editor you like (example using vim):
$ sudo vim /System/Library/LaunchDaemons/org.apache.httpd.plist