Skip to content

Instantly share code, notes, and snippets.

View gist:b7d5021826042ff537e7090a61ec5df7
Clonage dans 'v4l2loopback'...
--- Installing v4l2loopback (sudo privelege required)
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/roukmoute/workspace/avatarify/v4l2loopback modules
make[1] : on entre dans le répertoire « /usr/lib/modules/5.4.44-1-MANJARO/build »
CC [M] /home/roukmoute/workspace/avatarify/v4l2loopback/v4l2loopback.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /home/roukmoute/workspace/avatarify/v4l2loopback/v4l2loopback.mod.o
LD [M] /home/roukmoute/workspace/avatarify/v4l2loopback/v4l2loopback.ko
@roukmoute
roukmoute / TokenProvider.php
Created Jun 2, 2020
Generate a random token using /dev/random
View TokenProvider.php
<?php
declare(strict_types=1);
namespace App;
class TokenProvider
{
const RANDOM_COMPAT_READ_BUFFER = 8;
View import.sh
[postgres@roukmoute-pc TheArtOfPostgreSQL]$ make dropdb
dropdb --if-exists taop
dropuser --if-exists taop
[postgres@roukmoute-pc TheArtOfPostgreSQL]$ make
createuser -SDr taop
createdb -O taop taop
psql -d taop -c 'create extension btree_gist'
CREATE EXTENSION
psql -d taop -c 'create extension ip4r'
CREATE EXTENSION
@roukmoute
roukmoute / error.sh
Last active Aug 30, 2019
TAOP - Makefile - Import segfault
View error.sh
[postgres@roukmoute-pc TheArtOfPostgreSQL]$ make
createuser -SDr taop
createdb -O taop taop
psql -d taop -c 'create extension btree_gist'
CREATE EXTENSION
psql -d taop -c 'create extension ip4r'
CREATE EXTENSION
psql -d taop -c 'create extension hll'
CREATE EXTENSION
psql -d taop -c 'create extension cube'
@roukmoute
roukmoute / Terminal
Last active Apr 21, 2019
Issue to clone a repository on Manjaro
View Terminal
[roukmoute@roukmoute-pc ~]$ eval $(ssh-agent)
Agent pid 1086
[roukmoute@roukmoute-pc ~]$ git clone git@github.com:roukmoute/dotfiles.git
Cloning into 'dotfiles'...
Enter passphrase for key '/home/roukmoute/.ssh/id_rsa':
packet_write_wait: Connection to 140.82.118.3 port 22: Broken pipe
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
View recipes.txt
! uMatrix: Ruleset recipes 1.0
! Title: Rulesets for Roukmoute websites
! Maintainer: Roukmoute
!
! Lines starting with character "!" are ignored.
! Character "_" is an alias for "currently selected scope".
! An empty line MUST be used to separate distinct ruleset recipes.
Crunchyroll
@roukmoute
roukmoute / update date time
Last active Dec 27, 2018
update date time
View update date time
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
@roukmoute
roukmoute / keybase.md
Created Sep 7, 2017
public identity on keybase
View keybase.md

Keybase proof

I hereby claim:

  • I am roukmoute on github.
  • I am roukmoute (https://keybase.io/roukmoute) on keybase.
  • I have a public key ASCgXCCBqJkPAtB62ylKmWHFJ_74tIaCPBvspXMYW_S95wo

To claim this, I am signing this object:

@roukmoute
roukmoute / EntityRepository.php
Last active Apr 12, 2021
Concrete example of WHERE...IN subquery in doctrine 2
View EntityRepository.php
<?php
class MyRepository extends EntityRepository
{
public function whereInSubQuery(User $user)
{
$queryBuilder = $this->createQueryBuilder('my_repository');
$queryBuilder
->where(
$queryBuilder->expr()->in(
@roukmoute
roukmoute / Exception.php
Last active Aug 30, 2016
Exception with possibility to use a formatted string
View Exception.php
<?php
namespace Exception;
class Exception extends \Exception
{
/**
* @param string $message
* @param string|array $arguments
* @param int $code
* @param Exception|null $previous