Skip to content

Instantly share code, notes, and snippets.

View enko's full-sized avatar
🐉
🧙

Tim enko

🐉
🧙
View GitHub Profile
@lbehm
lbehm / sway-lock
Created April 18, 2023 22:11
Lock screen utility for sway desktop environment. The lock screen uses a blurred screenshot.
#!/bin/env bash
IMAGE=$(mktemp -t swaylock-$USERNAME-XXXXX.png)
trap "rm -f ${IMAGE}" EXIT
# grim creates a screenshot of eDP-1. You may have to adjust your output specifier.
# convert (ImageMagick / GraphicsMagick) applies glur filter. Be creative!
grim -o eDP-1 - | \
convert - \
@thoroc
thoroc / comcast.html
Created April 19, 2017 22:08
Comcast is using JavaScript injection to popup modem upgrade ads on non-HTTPS sites
<script language="JavaScript" type="text/javascript">
// Copyright (C) 2015 Comcast Cable Communications, LLC
// Contact Us: http://customer.xfinity.com/contact-us/
// Intended use of this message is to display critical and time sensitive notifications to customers.
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
@danvbe
danvbe / 1-Explanations.md
Last active August 12, 2024 08:14
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.