Skip to content

Instantly share code, notes, and snippets.

View mark-gerarts's full-sized avatar

Mark Gerarts mark-gerarts

  • Sentigrate
  • Belgium
View GitHub Profile
@mark-gerarts
mark-gerarts / test.php
Last active December 5, 2017 18:42
AutoMapper+ test case for issue #10
<?php
require 'vendor/autoload.php';
use \AutoMapperPlus\AutoMapper;
use \AutoMapperPlus\Configuration\AutoMapperConfig;
class B
{
public $x;
@mark-gerarts
mark-gerarts / apple_keyboard.sh
Last active June 16, 2021 05:53
Fix apple keyboard layout on linux
# More info: https://www.math.cmu.edu/~gautam/sj/blog/20171207-keyboard-settings.html
# and https://wiki.archlinux.org/title/Apple_Keyboard#hid_apple_module_options.
#
# These commands can be made permanent with modprobe, but I use them
# in a menu entry because the Apple keyboard isn't always plugged in.
# Swap the alt and command key
echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
# Fix the tilde key
@mark-gerarts
mark-gerarts / OAuthConnectController.php
Last active June 21, 2024 12:09
HWIOAuthBundle connect functionality without FUB
<?php
namespace Acme\Controller;
use HWI\Bundle\OAuthBundle\Templating\Helper\OAuthHelper;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Http\Util\TargetPathTrait;