Skip to content

Instantly share code, notes, and snippets.

View ebedy's full-sized avatar
🎯
Focusing

Edym Komlan BEDY ebedy

🎯
Focusing
View GitHub Profile
@ebedy
ebedy / source.list
Created September 6, 2023 18:51
source list for ubuntu 21.10 impish
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://no.archive.ubuntu.com/ubuntu/ impish main restricted
deb-src http://no.archive.ubuntu.com/ubuntu/ impish main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://no.archive.ubuntu.com/ubuntu/ impish-updates main restricted
deb-src http://no.archive.ubuntu.com/ubuntu/ impish-updates main restricted
@ebedy
ebedy / ContainerTest.php
Created August 11, 2022 01:14 — forked from lyrixx/ContainerTest.php
Test applications services can boot
<?php
namespace Tests\Integration;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Config\Util\XmlUtils;
class ContainerTest extends KernelTestCase
{
private const FILTER_LIST = [
1. Turn on Kali Linux, open terminal and type '' sudo killall pulseaudio '' and hit enter.
2. type '' sudo apt-get purge pulseaudio pulseaudio-utils gstreamer0.10-pulseaudio paman pavumeter pavucontrol '' and hit enter.
3. type '' rm ~/ .pulse-cookie ''and hit enter.
4. type '' rm -r ~/ .pulse '' and hit enter.
5. type '' sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui libalsaplayer0 '' and hit enter.
@ebedy
ebedy / run-jar-as-a-service.md
Created June 15, 2021 17:05 — forked from marlonbernardes/run-jar-as-a-service.md
How to make a jar file run on startup
  1. Create the start and stop scripts of your application.
  • Example:

myapp-start.sh

#!/bin/bash
cd /home/ubuntu/myapp/
java -jar myapp.jar --server.port=8888 &
@ebedy
ebedy / initd_java
Created June 15, 2021 17:05 — forked from mtsoleimani/initd_java
Init.d and Start Script for java based service. It uses pid file and checks process if exists
#!/bin/sh
# init.d script with LSB support.
### BEGIN INIT INFO
# Provides: SERVICE_NAME
# Required-Start: $network $local_fs $remote_fs $syslog
# Required-Stop:
# Should-Start: $named
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@ebedy
ebedy / SessionHandlerSubscriber.php
Created June 11, 2019 18:18
Symfony 4.3 auto logout
<?php
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;