Skip to content

Instantly share code, notes, and snippets.

View thamas's full-sized avatar

Tamás Hajas thamas

View GitHub Profile
@thamas
thamas / get-own-ip
Last active December 28, 2015 05:19
Get own IP address
curl -l http://echoip.net; echo
@thamas
thamas / css-class-drupal-wysiwyg-cke.md
Last active August 29, 2015 13:57
Make custom CSS classes work with Drupal WYSIWYG 7.x-2.2 and CKEditor 4.3.3

I use it to set img floats. To make it work

  1. be sure to define at least one inline element class (when you defined your image float classes), for examle Emphasize=span.emph
  2. add a "cache-buster" to the end of the path of you css file: /sites/all/themes/mytheme/css/style.css?v1 (the "chache-buster" is the "?v1" at the end of the path. More info: http://chipcullen.com/how-to-apply-classes-ckeditor-4-in-drupal-7/)
@thamas
thamas / Get back your Drupal install-profile
Last active August 29, 2015 14:05
Sometimes Drupal forgots about your install-profile. To fix:
drush vset install_profile 'profile-name'

This is not a straight translation of the lirycs but the English version of the song.

More info about the musical, The Attic: http://en.wikipedia.org/wiki/A_padlás

Light years

There are days when I feel
I could leave this whole tangled World behind
I look for an answer
But another question is all I find

This is a translation of "Az álom leterít" – a song from the former Hungarian blues band, called "Stexas"*

Dream is hunting me

Headlight drills through the night.
Then it disappears in the fog
It was't here maybe.

Oh I can only see your eyes shine,
and a parting word of your mouth,

<ul>
<li>
<a href="/" data-drupal-link-system-path="<front>">Frontpage</a>
</li>
<li>
<a href="/about" data-drupal-link-system-path="node/1">About us</a>
<ul>
<li>
<a class="is-active" href="/team" data-drupal-link-system-path="node/2">Team</a>
</li>
<ul class="c-menu-main">
<li class="c-menu-main__item">
<a href="/" class="c-menu-main__link" data-drupal-link-system-path="<front>">Frontpage</a>
</li>
<li class="c-menu-main__item c-menu-main__item--expanded c-menu-main__item--active-trail">
<a href="/about" class="c-menu-main__link" data-drupal-link-system-path="node/1">About us</a>
<ul class="c-menu-main__submenu">
<li class="c-menu-main__item c-menu-main__item--active-trail">
<a href="/team" class="c-menu-main__link is-active" data-drupal-link-system-path="node/2">Our team</a>
</li>
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'menu__main' -->
<!-- FILE NAME SUGGESTIONS:
* menu--main.html.twig
x menu.html.twig
-->
<!-- BEGIN OUTPUT from 'core/themes/stable/templates/navigation/menu.html.twig' -->
{% import _self as menus %}
{#
We call a macro which calls itself to render the full tree.
@see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{ menus.menu_links(items, attributes, 0) }}
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
@thamas
thamas / menu.html.twig
Created April 29, 2016 20:15
menu_name passed as argument
{{ menus.menu_links(items, attributes, 0, menu_name) }}
{% macro menu_links(items, attributes, menu_level, menu_name) %}