Skip to content

Instantly share code, notes, and snippets.

@SKempin
SKempin / Git Subtree basics.md
Last active April 17, 2024 03:47
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@Tuurlijk
Tuurlijk / BackendLayouts.ts
Last active February 1, 2017 12:36
Beating TYPO3 copy-mode-translations into submission
lib.layout.content = COA
lib.layout.content {
10 < styles.content.get
10.select {
where = colPos={field:colPos}
where.insertData = 1
where.stdWrap.noTrimWrap = || AND NOT sys_language_uid = 0|
where.stdWrap.noTrimWrap.if.isTrue.postUserFunc = TypoScript\PageIsCopyModeTranslation->evaluate
includeRecordsWithoutDefaultTranslation = 1
@GLMeece
GLMeece / latency_numbers.md
Last active March 1, 2024 10:02
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@stmllr
stmllr / RemoveUnreferencedFilesMarkedAsMissing.php
Created October 24, 2016 10:52
TYPO3 scheduler task to delete rows from sys_file without 1) a corresponding file and 2) a reference in sys_file_reference
<?php
namespace My\Ext\Scheduler\Task;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
@helhum
helhum / deploy-to-target-info.md
Last active August 23, 2018 13:30
TYPO3 setup steps

Requirements for deployment

  • ssh (generate key and put on server)
  • rsync must be available on both machines (deployment host and target host)
  • PHP cli binary must be available on both machines (deployment host and target host)
  • composer must be available on deployment host

Needed info for each target system:

  • deploy directory
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@helhum
helhum / install.sh
Last active January 10, 2023 15:38
Unattended TYPO3 7LTS installation (including introduction package)
composer create-project typo3/cms-base-distribution='^7.6.0' my-test-typo3 --no-interaction
cd my-test-typo3/
composer require helhum/typo3-console
# This will only work with PHP < 7 as realurl need PHP 5.x
composer require typo3-ter/introduction
cp web/typo3conf/ext/typo3_console/Scripts/typo3cms .
cp web/typo3conf/ext/bootstrap_package/Configuration/Apache/.htaccess web/
chmod +x typo3cms
./typo3cms install:setup --non-interactive --database-user-name="root" --database-user-password="root" --database-host-name="localhost" --database-port="3306" --database-name="t3_my_test" --admin-user-name="admin" --admin-password="password" --site-name="Auto Install"
./typo3cms database:updateschema '*.*'
@htuscher
htuscher / AbstractCommandController.php
Created November 27, 2015 08:02
TYPO3 Command Controller TypoScript from different rootPid
<?php
namespace Onedrop\Solution\Command;
/*****************************************************************
* Copyright notice
*
* (c) 2015 Hans Höchtl <hhoechtl@1drop.de>
*
* All rights reserved
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@NeoBlack
NeoBlack / cleanupFunctionalTestDatabases.sh
Last active August 29, 2015 14:21
shell script to remove functional test databases.
#!/bin/bash
################################################################################
# Cleanup databases after functional test runs
#
# call for a check:
# ./cleanupFunctionalTestDatabases.sh
# call for really delete databases:
# ./cleanupFunctionalTestDatabases.sh doit
################################################################################