Skip to content

Instantly share code, notes, and snippets.

View garbast's full-sized avatar

Sebastian Fischer garbast

View GitHub Profile
@garbast
garbast / Dockerfile
Created August 6, 2023 12:32
Composer image with rsync and mysql client
# docker build -t composer:test - < Dockerfile
FROM composer:latest
RUN set -eux ; \
apk add --no-cache \
rsync \
mysql-client
#!/bin/csh
# cfan.sh
# Manaual control over fans in PfSense (FreeBSD) on a Dell PowerEdge R210 ii system
# Original script: https://www.garron.me/en/bits/specify-editor-crontab-file.html
# Install:
# sudo pkg install ipmitool
# Add ipmi_load="YES" to /boot/loader.conf
# Add this script to /usr/bin/
# Add * * * * * /bin/csh /usr/bin/cfan.sh to cron file with sudo crontab -e
# Reboot
@garbast
garbast / DateFormatter.php
Last active August 25, 2021 12:41
Generate link to single news with date in path segment and ignore it in resolve
<?php
namespace Cp\CpSitepackage\Routing\Aspect;
class DateFormatter
{
public function format($value, $format = 'd.m.Y'): string
{
return date($format, $value);
}
@garbast
garbast / .gitlab-ci.yml
Created March 8, 2019 12:00
Deployment with deployerphp and gitlabci
cache:
paths:
- $CI_PROJECT_DIR/cache
- $CI_PROJECT_DIR/vendor
- $CI_PROJECT_DIR/.Build/vendor
stages:
- composer
- deploy
Level 1 - Tutorial 1
{spellName:"Tutorial 1",uuidMost:-9212014085409912628L,validSpell:1b,spellList:[0:{spellPosX:4,spellData:{spellKey:"trickDebug",params:{psi.spellparam.number:0,psi.spellparam.target:2}},spellPosY:3},1:{spellPosX:4,spellData:{spellKey:"selectorCaster",params:{}},spellPosY:4}],uuidLeast:-7812281509448144908L}
Level 2 - Tutorial 2
{spellName:"Tutorial 2",uuidMost:-5142199122538312424L,validSpell:1b,spellList:[0:{spellPosX:3,spellData:{spellKey:"connector",params:{psi.spellparam.target:2}},spellPosY:3},1:{spellPosX:3,spellData:{spellKey:"constantNumber",params:{},constantValue:"2"},spellPosY:4},2:{spellPosX:4,spellData:{spellKey:"trickDebug",params:{psi.spellparam.number:3,psi.spellparam.target:2}},spellPosY:3},3:{spellPosX:4,spellData:{spellKey:"selectorCaster",params:{}},spellPosY:4}],uuidLeast:-9206572619882318113L}
Level 3 - Tutorial 3
{spellName:"Tutorial 3",uuidMost:7403931311755382661L,validSpell:1b,spellList:[0:{spellPosX:3,spellData:{spellKey:"operatorEntityLook",params:{psi.spellp
<body>
<div id="mapper">
<table>
<row
v-for="row in rows"
v-bind:row="row"
v-bind:key="row.id">
</row>
@garbast
garbast / gist:275ffa6ab14b52a3ea6ab8a8fb2b1252
Created July 6, 2016 12:08
Getting typoscript in Backend
/**
* Works with:
*
* module.tx_extensionname_pluginname < plugins.tx_extensionname_pluginname
*
* @return void
*/
protected function initializeTypoScript()
{
/** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
@garbast
garbast / suggest.js
Created June 9, 2016 09:47
Problem with suggest as mixed mode file
/* global window, define, jQuery */
(function(factory) {
"function" == typeof define && define.amd ? define('suggest', ['jquery', 'jquery-ui'], factory) : factory(jQuery)
})(function(jQuery, jQueryUi) {
console.log('yeah');
function initialize() {
// Change back to the old behavior of auto-complete
// http://jqueryui.com/docs/Upgrade_Guide_184#Autocomplete
jQuery.ui.autocomplete.prototype._renderItem = function( ul, item ) {
return jQuery( "<li></li>" )
@garbast
garbast / getter_for_first_request.txt
Created February 26, 2016 13:56
Quick solution for requests
diff --git a/typo3/sysext/core/Classes/Http/ServerRequestFactory.php b/typo3/sysext/core/Classes/Http/ServerRequestFactory.php
index bee3e59..7b9cf82 100644
--- a/typo3/sysext/core/Classes/Http/ServerRequestFactory.php
+++ b/typo3/sysext/core/Classes/Http/ServerRequestFactory.php
@@ -27,6 +27,23 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
class ServerRequestFactory
{
/**
+ * First request instantiated
+ *
@garbast
garbast / steam.sls
Created October 17, 2015 14:06
Install steam via saltstack
dpkg_steam_license:
cmd.run:
- unless: which steam
- name: '/bin/echo /usr/bin/debconf steam/license note | /usr/bin/debconf-set-selections'
- require_in:
- pkg: steam
- cmd: dpkg_steam_question
dpkg_steam_question:
cmd.run: