Skip to content

Instantly share code, notes, and snippets.

View RoySegall's full-sized avatar
⌨️
God is a coder

Roy Segall RoySegall

⌨️
God is a coder
View GitHub Profile
diff --git a/file_entity.info b/file_entity.info
index ce95294..35830d9 100644
--- a/file_entity.info
+++ b/file_entity.info
@@ -12,6 +12,7 @@ files[] = views/views_handler_filter_file_type.inc
files[] = views/views_handler_field_file_link.inc
files[] = views/views_handler_field_file_link_edit.inc
files[] = views/views_handler_field_file_link_delete.inc
+files[] = views/views_handler_filter_scehma_type.inc
files[] = views/views_handler_field_file_link_download.inc
@[id|style|class],
a[!href|target<_blank|title|name],
div[align<center?justify?left?right],
p[align<center?justify?left?right],
br,span,cite,code,blockquote,ul,ol,li,dl,dt,dd,img[!src|width|height|alt|title],
sup,sub,
table[style],
tr,
td[colspan|rowspan],
caption,
<?php
$terms = array(
'foo', 'bar', 'foobar', 'barfoo',
);
foreach ($terms as $terms) {
dpm($terms);
}
<?php
/**
* Implements hook_menu().
*/
function module_menu() {
$items = array();
$items['foo'] = array(
'page title' => 'Foo',
<?php
/**
* Implements hook_comment_insert().
*
* Send a message to the node author when a new comment is created.
*/
function example_comment_insert($comment) {
$node = node_load($comment->nid);
$message = message_create('example_create_comment', array('uid' => $node->uid));
<?php
/**
* Implements hook_node_update().
*/
function hook_node_load($node) {
if ($node->original->status == $node->status) {
return;
}
$plugin = array(
'title' => t('Thumbs up and down'),
'description' => t('Thumbs up and down widget.'),
'class' => 'voteUpDownThumbs',
'alter template variables' => 'vud_widget_thumbs_alter_template_vars',
'assets' => array(
'js' => array('thumbs.js'),
'css' => array('thumbs.css'),
),
'hook theme' => 'addthis_pane_pane_content_type_theme',
$form['vote_up_down'] = array(
'#type' => 'fieldset',
'#title' => $instance['label'],
'#collapsible' => TRUE,
);
$entity = $element['#entity'];
$entity_type = $element['#entity_type'];
$form['#submit'][] = 'vote_up_down_widget_submit_handler';
<?php
global $language;
$wrapper = entity_metadata_wrapper('node', $nid);
$tnid = $wrapper->language($language->language)->getIdentifier();
public class singHadGadiaSong {
public static void singHadGadia(String[] characters, String[] actions, int n)
{
if (n >= characters.length)
return;
System.out.println("ואתא " + characters[n]);
for (int i = n - 1; i >= 0; i--) {
String prefix = (i == n - 1 ? "ו" : "ד");
System.out.println(prefix + actions[i] + " ל" + characters[i]);
}