Skip to content

Instantly share code, notes, and snippets.

@kraftb
kraftb / gist:9257850
Created February 27, 2014 19:45
Debugging a T3D File
#!/usr/bin/php
<?php
/**
* Returns the next content part form the fileresource (t3d), $fd
*
* @param pointer $fd File pointer
* @param boolean $unserialize If set, the returned content is unserialized into an array, otherwise you get the raw string
* @param string $name For error messages this indicates the section of the problem.
* @return string Data string
In other solr plugins I saw the following code to add/reset the current term:
Stem stem = buffer.remove(0);
termAtt.copyBuffer(stem.getStem(), 0, stem.getStemLength());
termAtt.setLength(stem.getStemLength());
I use something the following code:

#How to start with TYPO3 in 2013 6.x Versions mentioned. Based on personal experience.

Prerequisites

You should at least be familar with HTML and CSS . Some JS knowledge is wise to have. After you are familar with these things you are able to dig into CMS business. If you don´t have a clue about it, you will get seriously frustrated.

If you dig into TYPO3 you need a lot of time to understand it.

Keep it in mind

@kraftb
kraftb / gist:5684525
Created May 31, 2013 12:01
Selenium Task for migrating a TYPO3 mantis bugtracker entry to forge
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://forge.typo3.org/projects/extension-direct_mail/" />
<title>Migrate-bugentry-2-forge</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
@kraftb
kraftb / temp.php
Created May 22, 2015 19:59
Read out temperature from an LM75 via Arduino as I2C adapter
#!/usr/bin/php
<?php
define('CHAR_ERROR', chr(0x1B)); // <ESC>
define('CHAR_ESCAPE', chr(0x5C)); // '\'
define('CHAR_ESCAPED_ERROR', chr(0xB1));
define('CHAR_ESCAPED_ESCAPE', chr(0xC5));
define('LM75_ADDR', 0x48);
@kraftb
kraftb / PATCH_perf-ext.diff
Created May 10, 2015 08:37
ext2 performance improvement: ext2_statfs
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 9f9992b..c7bb6d2 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -1520,17 +1520,3 @@ int ext2_bg_has_super(struct super_block *sb, int group)
return 1;
}
-/**
- * ext2_bg_num_gdb - number of blocks used by the group table in group
@kraftb
kraftb / Makefile
Created March 18, 2015 06:42
Makefile for gEDA projects (gschem, pcb)
SCHEMATICS=tom-alexandria-1.sch tom-alexandria-2.sch tom-alexandria-3.sch tom-alexandria-4.sch
TARGET=tom-alexandria
all: $(TARGET).drc
gsch2pcb -o $(TARGET) $(SCHEMATICS)
edit-schematic:
gschem $(SCHEMATICS)
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Crossport setup');
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'ThinkopenAt.' . $_EXTKEY,
'user', // Make module a submodule of 'user'
@kraftb
kraftb / gist:9349612
Created March 4, 2014 16:19
An experiment for implementing git branach read access control
diff --git a/src/VERSION b/src/VERSION
new file mode 100644
index 0000000..56fa930
--- /dev/null
+++ b/src/VERSION
@@ -0,0 +1 @@
+v3.5.3.1-1-gf8776f5
diff --git a/src/gitolite-shell b/src/gitolite-shell
index 7a27cc0..f6a3442 100755
--- a/src/gitolite-shell