Skip to content

Instantly share code, notes, and snippets.

@etobi
etobi / Systemlog.php
Created Sep 30, 2017
Syslog in Slack posten
View Systemlog.php
<?php
namespace Foo\Bar\Hooks;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Systemlog
{
private $severityLabel = [
GeneralUtility::SYSLOG_SEVERITY_INFO => 'INFO',
View dce.patch
diff --git i/Classes/Domain/Repository/DceRepository.php w/Classes/Domain/Repository/DceRepository.php
index dafb5dd..fa07347 100644
--- i/Classes/Domain/Repository/DceRepository.php
+++ w/Classes/Domain/Repository/DceRepository.php
@@ -166,9 +166,10 @@ class DceRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
*/
protected function processFillingFields(
\ArminVieweg\Dce\Domain\Model\Dce $dce,
- array $fieldList,
+ array $fieldList = null,
@etobi
etobi / Rezept.md
Last active Sep 26, 2016
Schichtfleisch
View Rezept.md
  • ganzen schweinenacken vom Knochen befreien und in ca 1cm-Scheiben schneiden.
  • Fleisch rubben (MagicDust oder z.B. Gyrosgewürzmischung) und über Nacht in den Kühlschrank stellen
  • DutchOveb mit Bacon auslegen
  • DO auf die Seite stellen und abwechselnd Fleisch, Zwiebeln, Paprika, Kartoffelscheiben, ... aufschichten
  • oben drauf restliches Gemüse verteilen, mit einem guten Schuß BBQ-Soße versehen und mit reichlich Bacon (der oben liegt wird am besten) abdecken
  • ca 2 Std garen; 6 Brikettes unter und 9 auf dem DO
  • dazu: Brot, Reis oder Kartoffeln
@etobi
etobi / install image
Last active Aug 29, 2015
install basic raspbian
View install image
wget http://downloads.raspberrypi.org/raspbian_latest -O raspbian.zip
unzip raspbian.zip
diskutil list
sudo dd bs=4m if=2015-02-16-raspbian-wheezy.img of=/dev/rdiskXXXX
# boot pi
nmap -v -sP 192.168.50.1-255
@etobi
etobi / gist:7590aee22f9b84b69d73
Last active Jan 17, 2017
Monitoring mit Icinga (Nagios) auf Raspberry PI installieren
View gist:7590aee22f9b84b69d73
# aktuelles rasbian installieren
# hostname, password etc setzen
sudo raspi-config
# alles auf aktuellen Stand bringen
sudo apt-get update
sudo apt-get upgrade
# Feste IP konfigurieren
View fake-sendmail.sh
#!/usr/bin/ruby
path = "/Users/tobias/fake-mailer"
Dir.mkdir(path) if !File.exists?(path)
File.open("#{path}/#{Time.now.to_i}.eml", "w") do |f|
f.puts ARGV.inspect
$stdin.each_line { |line| f.puts line }
end
sleep(1)
View .gitconfig
[alias]
st = status -sb
spu = stash
spo = stash pop
ci = commit
br = branch
co = checkout
cp = cherry-pick
df = diff
dfword = diff --color-words
View composer.json
{
"minimum-stability": "dev",
"repositories": [
{
"type": "composer",
"url": "http://composer.typo3.org/"
}
],
"require": {
"typo3/cms": "6.2.5",
@etobi
etobi / log2slack
Created Nov 4, 2014
Simple shell script to monitor a log file (e.g. TYPO3 syslog) and push it to a slack channel
View log2slack
#!/bin/sh
tail -n 1 -f /var/path/to/file.log | while read line; do
echo $line | grep -v "PATTERN TO IGNORE"
if `test $? -eq 0`; then
cleanLine=`echo $line | tr -d '"'`
payload="payload={\"channel\": \"#channel\", \"username\": \"dev:typo3-sys.log\", \"text\": \"$cleanLine\", \"icon_emoji\": \":interrobang:\"}"
curl -X POST --data-urlencode "$payload" https://TEAM.slack.com/services/hooks/incoming-webhook\?token\=TOKEN
fi
done
View kaybase.md

Keybase proof

I hereby claim:

  • I am etobi on github.
  • I am etobi (https://keybase.io/etobi) on keybase.
  • I have a public key whose fingerprint is DE68 5155 366A AA64 1A10 2287 0580 AC5B B503 C9B3

To claim this, I am signing this object:

You can’t perform that action at this time.