This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.ns("TYPO3.Extjsformsample.UserInterface"); | |
TYPO3.Extjsformsample.UserInterface.MyForm = function() { | |
TYPO3.Extjsformsample.UserInterface.MyForm.superclass.constructor.call(this, { | |
id: 'myformid', | |
title: 'My test form', | |
defaultType: 'textfield', | |
items: [{ | |
fieldLabel: 'Name', | |
name: 'name', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDb() | |
{ | |
require($_SERVER['DOCUMENT_ROOT'] . '/typo3conf/localconf.php'); | |
$db = new DBMysql($typo_db_host, $typo_db_username, $typo_db_password); | |
$db->connect($typo_db); | |
return $db; | |
} | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apache+mariadb+php+misc | |
sudo apt-add-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install blueman libspa-0.2-bluetooth vim curl git git-gui gitk htop nginx nginx-extras mariadb-server zip graphicsmagick php-cli php-gd php-xml php-mysql php-sqlite3 php-mbstring php-curl php-imagick php-xml php-zip php-bcmath php-bz2 php-soap php-intl php-apcu php-pcov php-fpm php-yaml | |
# wp-cli | |
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
=begin | |
If you have subversion repository with many externals, it may take a bit too long to update it, as updates happen one after another. | |
This bit of script updates each external in parallel, making it oh so much faster. | |
(note: if you add an external or change an external property in another way, you'll need to run the standard svn up once) | |
Last seen on http://codesnippets.joyent.com/posts/show/548 | |
=end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This script should be used with CRON to synchronise read-only mirror of SVN to Github.com. | |
* It will automatically create repositories on github.com | |
* | |
* REQUIREMENT: svn2git from https://github.com/nirvdrum/svn2git | |
* | |
* The configuration file should look similar to: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Memory benchmark related to http://stackoverflow.com/questions/11657835/how-to-get-a-one-dimensional-scalar-array-as-a-doctrine-dql-query-result | |
// Build an array of 50 MiB | |
$data = []; | |
for ($i = 0; $i < 1024; $i++) { | |
$data[] = ['id' => str_repeat(' ', 1024 * 50)]; // store 50kb more | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# print usage | |
DOMAIN=$1 | |
if [ -z "$1" ]; then | |
echo "USAGE: $0 domain.lan" | |
echo "" | |
echo "This will generate a non-secure self-signed wildcard certificate for given domain." | |
echo "This should only be used in a development environment." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax "gitcommit" "COMMIT_EDITMSG$" | |
color white "#.*" | |
color green "#.(new file|modified|deleted|renamed).*" | |
color yellow start="# Changes.*" end="# Changed.*" | |
color cyan start="# Untracked.*" end="diff" | |
color cyan start="# Untracked.*" end="$$" | |
color brightred "^deleted file mode .*" | |
color brightgreen "^\+.*" | |
color brightred "^-.*" | |
color brightyellow "^(diff|index|---|\+\+\+).*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Everything else that does not exists on disk redirect to Angular | |
location ~ ^/(?<selectedLanguage>ar|br|cs|de|en|es|fr|is|it|ku|lb|pl|pt|zh) { | |
# If bot, give a SSR prerendered page | |
error_page 419 = @ssr; | |
if ($http_user_agent ~* "yahoo|bingbot|baiduspider|yandex|yeti|yodaobot|gigabot|facebookexternalhit|twitterbot") { | |
return 419; | |
} | |
try_files $uri /$selectedLanguage/index.html?$args; | |
} |