Skip to content

Instantly share code, notes, and snippets.

using System;
namespace FreshMvvm
{
public class FreshPageModelMapper : IFreshPageModelMapper
{
public string GetPageTypeName (Type pageModelType)
{
var name = pageModelType.AssemblyQualifiedName;
if (name.IndexOf ("PageModel") != -1)
server {
listen 80;
root /var/www/web;
# Enable compression
gzip_static on;
# Upload max size
client_max_body_size 10m;
@blackice2999
blackice2999 / menu-local-task.html.twig
Created August 3, 2015 10:52
Drupal 8 - How to add classes to link (render array) without using preprocess....
{#
/**
* @file
* Default theme implementation for a local task link.
*
* Available variables:
* - attributes: HTML attributes for the wrapper element.
* - is_active: Whether the task item is an active tab.
* - link: A rendered link element.
*
<?php
/**
* @file
*
* @see http://drupal.org/user/413429
*/
function hook_block_view($delta = '') {
@blackice2999
blackice2999 / de.js
Created March 23, 2014 23:12
add de.js for: PRE ELEMENT FIX Author: Thomas Andersen <tan@enonic.com> CSS used with permission from Matt Gallagher <http://projectswithlove.com/>
tinyMCE.addI18n('de.preelementfix',{
mei_remove_css_alias: 'CSS alias entfernen'
});
# encoding: UTF-8
# Chiliproject to Redmine converter
# =================================
#
# This script takes an existing Chiliproject database and
# converts it to be compatible with Redmine (>= v2.3). The
# database is converted in such a way that it can be run multiple
# times against a production Chiliproject install without
# interfering with it's operation. This is done by duplicating
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
exists() {
if command -v $1 &>/dev/null
then
return 0
else
return 1
fi
<?php
/**
* @file
* Provide per node access control
*/
/**
* Implements hook_help().
*/
@blackice2999
blackice2999 / modulename.module
Created January 3, 2012 09:15
Drupal: Text Formatter Plaintext trimmed
<?php
function evt_news_field_formatter_info() {
return array(
'text_plain_trimmed' => array(
'label' => t('Plain text (trimmed)'),
'field types' => array('text', 'text_long', 'text_with_summary'),
'settings' => array('trim_length' => 300),
));
}