Skip to content

Instantly share code, notes, and snippets.

Avatar

Harald Atteneder urbantrout

View GitHub Profile
View gist:85a44ba3f14ed3dccd47fb290522e5ef

Thanks to machine-drivers/docker-machine-driver-xhyve#123 (comment)

  1. Go to ~/.docker/machine/machines/machine_name
  2. sudo hdiutil resize -size new_size root-volume.sparsebundle (i.e. new size can be 30g)
  3. Edit config.json and provide new size in Driver.DiskSize property
  4. SSH to the machine
  5. sudo fdisk /dev/sda then:
    • d
    • 2
  • n
@urbantrout
urbantrout / functions.php
Created Nov 23, 2017
WordPress - Disable Emojis
View functions.php
function disable_wp_emojicons() {
// all actions related to emojis
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
@urbantrout
urbantrout / LanguageMenu.fusion
Last active Nov 10, 2017 — forked from hhoechtl/LanguageMenu.ts2
Neos Fusion condition LanguageMenu if dimension exists
View LanguageMenu.fusion
languageMenu = DimensionsMenu {
templatePath = 'resource://UrbanTrout.Site/Private/Templates/FusionObjects/LanguageMenu.html'
dimension = 'language'
# Only show languageMenu if 'en' dimension exists.
@if.condition = ${Type.className(q(node).context({'dimensions': {'language': ['en']}, 'targetDimensions': {'language': 'en'}}).get(0)) == 'Neos\ContentRepository\Domain\Model\Node'}
}