Skip to content

Instantly share code, notes, and snippets.

View jacobsenj's full-sized avatar
:octocat:

Jens Jacobsen jacobsenj

:octocat:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jacobsenj on github.
  • I am jacobsenj (https://keybase.io/jacobsenj) on keybase.
  • I have a public key ASBx4qb1juRy5V2gPrpxLnuxg4kwxS6TH3Ve-RdT3obehQo

To claim this, I am signing this object:

jjacobsen@J ➜ ~/Sites/uebertest2.dev/src ln -nfs ~/Sites/typo3/current7x typo3_src
jjacobsen@J ➜ ~/Sites/uebertest2.dev/src ln -nfs typo3_src/typo3
jjacobsen@J ➜ ~/Sites/uebertest2.dev/src ln -nfs typo3_src/index.php
jjacobsen@J ➜ ~/Sites/uebertest2.dev/src touch FIRST_INSTALL
- Installed via Install Tool -
- Installed ext:coreapi via Extension Manager -
- Installed ext:typo3_console via Extension Manager -
jjacobsen@J ➜ ~/Sites/uebertest2.dev/src ./typo3cms siteapi:info
@jacobsenj
jacobsenj / realurl-default-language.md
Created June 9, 2016 09:19
TYPO3 ext:realurl - define custom "default" language where sys_language_uid != 0 (i.e. no language param in url)

Apply default language here:

<?php
 namespace Vendor\Ext\Decoder;
 
 class UrlDecoder extends \DmitryDulepov\Realurl\Decoder\UrlDecoder {
 
     /**
      * Decodes preVars into request variables.
@jacobsenj
jacobsenj / select_problem.md
Last active June 2, 2016 11:53
Typoscript CONTENT select???

I'm trying to get the description of a sys_file_metadata entry by field file (sys_langugage_uid = 0) for all languages. Default language is 0, german is 16.

Works for default language, but not for german:

15 = CONTENT
15 {
    wrap = <span class="news-img-caption">|</span>
    table = sys_file_metadata
    select {
<?php
$question = new \Symfony\Component\Console\Question\ConfirmationQuestion('Continue with deployment of branch [' . $branch . '] for domain ' . $domain . ' [' . $server . "]?\n(y|N) ", FALSE, '/^(y|j)/i');
$helper = new \Symfony\Component\Console\Helper\QuestionHelper;
$input = new \Symfony\Component\Console\Input\ArgvInput;
$output = new \Symfony\Component\Console\Output\StreamOutput(fopen('php://stdout', 'w'));
if (!$helper->ask($input, $output, $question)) {
exit;
}
<?php
/**
* @var \TYPO3\Surf\Domain\Model\Deployment $deployment
* @var \TYPO3\Surf\Domain\Model\SimpleWorkflow $workflow
*/
$domain = '';
$server = '';
$user = '';
$branch = 'master';
@jacobsenj
jacobsenj / NameRepository.php
Created December 12, 2013 13:29
Repository Method to get MAX + 1 of a number field within the entity
namespace Application\Repository;
use Application\Entity\Name;
use Doctrine\ORM\EntityRepository;
class NameRepository
extends EntityRepository
{
/**
* @return int
@jacobsenj
jacobsenj / css_resources.md
Created December 12, 2013 13:11 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@jacobsenj
jacobsenj / javascript_resources.md
Created December 12, 2013 13:11 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage