Skip to content

Instantly share code, notes, and snippets.

View cvergne's full-sized avatar
👨‍💻
Probably developing…

Christophe Vergne cvergne

👨‍💻
Probably developing…
View GitHub Profile
@lyrixx
lyrixx / CHANGELOG-3.0.md
Last active June 3, 2024 07:53
Symfony CHANGELOG

Bridge/Doctrine

  • removed EntityChoiceList
  • removed $manager (2nd) and $class (3th) arguments of ORMQueryBuilderLoader
  • removed passing a query builder closure to ORMQueryBuilderLoader
  • removed loader and property options of the DoctrineType

Bridge/Monolog

  • deprecated interface Symfony\Component\HttpKernel\Log\LoggerInterface has been removed
@stu43005
stu43005 / install_AdGuardHome.sh
Created December 4, 2020 16:30
install AdGuard Home in Synology RT1900ac
mkdir /opt
cd /opt
wget https://github.com/AdguardTeam/AdGuardHome/releases/download/latest/AdGuardHome_linux_armv7.tar.gz
tar -xzvf AdGuardHome_linux_armv7.tar.gz
# grep -rn '/etc/' -e 'dnsmasq'
# netstat -lnp | grep 'dnsmasq'
echo "port=0" >> /etc/dhcpd/dhcpd-port-port.conf
echo 'enable="yes"' > /etc/dhcpd/dhcpd-port-port.info
echo "port=0" >> /etc/dhcpd/dhcpd.conf
@me7media
me7media / PHPSTORM XDEBUG ubuntu NGINX php7.2-fpm
Created October 10, 2018 15:02
PHPSTORM XDEBUG ubuntu NGINX php7.2-fpm
sudo apt install php7.2-xdebug
sudo find / -name 'xdebug.so'
sudo gedit /etc/php/7.2/fpm/php.ini
sudo gedit /etc/php/7.2/cli/php.ini
sudo gedit /etc/php/7.2/cli/conf.d/20-xdebug.ini
[Xdebug]
; путь к файлу so, который мы временно сохаринили на шаге раньше
zend_extension=/usr/lib/php/20170718/xdebug.so
; остальные обязательные параметры
xdebug.profiler_enable_trigger=1
@wgh000
wgh000 / code-review-checklist.md
Last active August 18, 2019 12:37 — forked from nerandell/code-review-checklist.md
PHP Code Review Guidelines

Make sure these boxes are checked before submitting the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions PSR-1 and PSR-2
  • Declared variables are used
  • Variable names are simple, short and spelt correctly
  • No negatively named boolean variables
  • Variable names contain units where applicable
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active September 20, 2024 19:47 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@joyrexus
joyrexus / README.md
Last active August 6, 2024 16:07
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
extension SequenceType {
func groupBy<Key: Hashable>(handler: (Generator.Element) -> Key) -> [Key: [Generator.Element]] {
var grouped = [Key: Array<Generator.Element>]()
self.forEach { item in
let key = handler(item)
if grouped[key] == nil {
grouped[key] = []
}
@nerandell
nerandell / code-review-checklist.md
Last active May 21, 2024 17:43
PHP Code Review Guidelines

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
@Nightbr
Nightbr / CategoryListener.php
Last active October 6, 2021 17:20
FOSElasticaBundle: Doctrine ORM Listener with relation updates
<?php
namespace AppBundle\Listener\Search;
/**
* Automatically update ElasticSearch based on changes to the Doctrine source
* data. One listener is generated for each Doctrine entity / ElasticSearch type.
*/
class CategoryListener extends SearchListener
{