Skip to content

Instantly share code, notes, and snippets.

View a-r-m-i-n's full-sized avatar

Armin Vieweg a-r-m-i-n

View GitHub Profile
@a-r-m-i-n
a-r-m-i-n / halt.bat
Created March 11, 2018 13:42
Windows Batch file to perform "vagrant halt" on all running machines.
@echo off
vagrant global-status | awk '/running/{print $1}' | xargs -r -d '\n' -n 1 -- vagrant halt
@a-r-m-i-n
a-r-m-i-n / _README.md
Last active February 22, 2018 19:26
TYPO3 CMS TypoScript Condition to check for existing translation of current page

Usage

[userFunc = \Vendorname\Extension\UserConditions\user_translationExistsNot()] && [globalVar = GP:L > 0]
    # Add canonical tag
    # and/or display a notice, that the current page is not translated yet and the original contents are displayed
[global]

Install

@a-r-m-i-n
a-r-m-i-n / purge.sh
Last active September 6, 2017 20:04 — forked from adrienbrault/purge.sh
Script to reduce VM size before packaging for vagrant
#!/bin/bash
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
# rm -rf /var/www/html/*
# BE CAREFUL with synched folders!!!
rm -rf ~/.composer/vendor/*
@a-r-m-i-n
a-r-m-i-n / Vagrantfile
Created May 26, 2017 09:56
Ubuntu Xenial 64Bit Vagrant Box, for Virtual Box. Install scripts for TYPO3 8.7.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Requires to perform this first:
# `vagrant plugin install vagrant-winnfsd`
# `vagrant plugin install vagrant-bindfs`
#
# Put this Vagrantfile to in root directory of the TYPO3 extension you want to develop with
# and perform: `vagrant up`
#
@a-r-m-i-n
a-r-m-i-n / bash.sh
Created May 13, 2017 16:50
How to install TYPO3 from commandline
cd /var/www/html
rm -Rf *
composer require typo3/cms:"^7.6" helhum/typo3-console:"^4.5" gridelementsteam/gridelements:"^7.1"
vendor/bin/typo3cms install:setup --force --database-user-name "root" --database-user-password "" --database-host-name "localhost" --database-name "typo3_76" --database-port "3306" --database-socket "" --admin-user-name "admin" --admin-password "password" --site-name "TYPO3 Project" --site-setup-type "site" --use-existing-database 0
vendor/bin/typo3cms cache:flush
php typo3/cli_dispatch.phpsh extbase extension:install gridelements
@a-r-m-i-n
a-r-m-i-n / facebook-flat-dark-gray.css
Created February 24, 2017 22:39
Flat Dark Gray - Just color adjustments (for browser extensions like Stylish, https://userstyles.org/)
body {
color: #ccc !important;
background-color: rgb(43, 43, 43) !important;
}
a {
color: #ccc !important;
}
input.inputtext {
color: #ccc !important;
background-color: #333 !important;
@a-r-m-i-n
a-r-m-i-n / composer.json
Last active January 12, 2018 19:28
Run local webserver in PHP and open default browser (on windows)
{
"require": {
"symfony/process": "^3.2"
}
}
@a-r-m-i-n
a-r-m-i-n / keepass-linkhandler-for-winscp.md
Last active June 26, 2018 21:19
Keepass SSH Link Handler for WinSCP

Keepass SSH Link Handler for WinSCP

Add this to a new URL Override (in Options -> Integration):

Scheme: ssh

URL override: cmd://C:\PROGRA~2\WinSCP\WinSCP.exe -ssh {USERNAME}:{T-CONV:/{PASSWORD}/Uri/}@{URL:RMVSCM}

Adjust path to WinSCP if necessary. Then use ssh:// in URL of your password entries.

@a-r-m-i-n
a-r-m-i-n / tampermonkey.js
Created October 16, 2016 15:09
Calculate difference between added and removed lines and displays it in Bitbucket commits
// ==UserScript==
// @name Bitbucket Commit Line Difference
// @namespace ArminVieweg
// @version 0.1
// @description Calculate difference between added and removed lines and displays it in Bitbucket commits
// @author Armin Vieweg <armin@v.ieweg.de>
// @match https://bitbucket.org/*/*/commits/*
// @grant none
// ==/UserScript==
@a-r-m-i-n
a-r-m-i-n / index.php
Created May 17, 2016 07:58
Basic Usage of SwiftMailer
<?php
require_once('vendor/autoload.php'); // get and include swift mailer library via composer
$text = 'Hallo!
Dies ist eine Test-E-Mail.
Vielen Dank und schöne Grüße';
// New message instance with basic mail settings
$message = \Swift_Message::newInstance();