Skip to content

Instantly share code, notes, and snippets.

View 4aficiona2's full-sized avatar
👾
Meandering through space

Michael Zumstein 4aficiona2

👾
Meandering through space
View GitHub Profile
@4aficiona2
4aficiona2 / SassMeister-input-HTML.html
Created February 17, 2015 09:20
Generated by SassMeister.com.
<ul>
<li>
Equal<br/>height<br/>Test
</li>
<li>
Still not so equal
</li>
<li>
Test<br/>Test
</li>
@4aficiona2
4aficiona2 / toggleAllDrupalPermissions
Created May 27, 2015 10:05
Drupal permissions - check all checkboxes for a certain role "/de/admin/people/permissions/?" if none are selected, otherwise they get inverted (disselected)
jQuery("#permissions")
.find("input.real-checkbox[type=checkbox]")
.click()
@4aficiona2
4aficiona2 / pantheon-scripts.sh
Last active December 15, 2015 13:50
Drush scripts invoked via Pantheon terminal terminus on Pantheon server
terminus drush en ds --site=bspv --env=dev
@4aficiona2
4aficiona2 / menu--main.html.twig
Last active February 8, 2023 21:38
Drupal 8 - Main menu twig template with adjustments for Yokai, base template was initialy classy theme
{#
/**
* @file
* Default theme implementation to display a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
@4aficiona2
4aficiona2 / resample-psi.sh
Created July 28, 2016 16:05
Resample specified images to 72 DPI
#!/bin/bash
if [[ ! "$1" || "$1" == "-h" || "$1" == "--help" ]]; then cat <<HELP
adapted from https://gist.github.com/rraallvv/d5336521a9dbe97123c6
Resample specified images to 72 DPI
http://benalman.com/
Usage: $(basename "$0") [img [img ...]]
The new MacBook Pro retina display is amazing, but screengrabs taken on
@4aficiona2
4aficiona2 / TeaserboxRandomImage.php
Last active April 12, 2017 12:48
Random Teaser Image Field for Drupal 8 (valid for content type teaserbox in viewmode teaser)
<?php
namespace Drupal\yokai_helper\Plugin\DsField;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Component\Utility\Html;
use Drupal\Core\Url;
use Drupal\ds\Plugin\DsField\DsFieldBase;
// more details here:
@4aficiona2
4aficiona2 / dos2unix.txt
Last active December 5, 2016 03:42
Get rid of "fatal: CRLF would be replaced by LF in [file]"
// single file
dos2unix -f FILENAME
// change line endings on files recursively
find /core/sites/all/modules -type f -exec dos2unix {} +
thx https://coderwall.com/p/lc8rkg/get-rid-of-fatal-crlf-would-be-replaced-by-lf-in-file
$mq-mobile-portrait : 400px !default;
$mq-mobile-narrow : 580px !default;
$mq-mobile : 750px !default;
$mq-tablet-portrait : 1000px !default;
$mq-tablet : 1200px !default;
$mq-desktop : 1382px !default;
$mq-desktop-wide : 1920px !default;
$mq-desktop-wider : 2560px !default;
$base-font__size--min : 12px;
@4aficiona2
4aficiona2 / .laptop.local
Last active November 22, 2021 18:55
Custom brew configuration besides Thoughtbots brew setup
#!/bin/sh
fancy_echo "Install and prepare Mac App Store command line interface"
brew install mas
#mas signin --dialog [email protected] #signin does not anymore work since OSX 10.13, signin to App Store manually / through GUI before executing the script
fancy_echo "Installing apps ..."
brew update --force # https://github.com/Homebrew/brew/issues/1151
brew bundle --file=- <<EOF