Skip to content

Instantly share code, notes, and snippets.

Working from home

Jérôme Lanteri jerome-diver

Working from home
Block or report user

Report or block jerome-diver

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jerome-diver / try QThread list of threads managment
Last active Jun 7, 2019
I'm trying to manage a list of threads and from own signal emit self at end of run job, slot connected should remove thread (but it doesn't). Why ?
View try QThread list of threads managment
from PyQt5.QtCore import QObject, QThread, QSemaphore, QReadWriteLock, pyqtSignal, pyqtSlot
import random, time
class Share():
data = dict()
def __init__(self, key, value):[key] = value
def get(key):
View try to mix base class interface with QObject
# Test zope.interface to get abstract class with Python (from jupyter)
from zope.interface import Interface
from zope.interface.declarations import implementer
from PyQt5.QtCore import QObject
class Base(zope.interface.Interface, QObject):
"""My base cabstract class"""
name = zope.interface.Attribute("Base abstract class")
"""Please, let me know which child is calling me: 'parent' ? """
def read_childs(cls):
"""Return childs of cls"""
return cls.__subclasses__()
class A:
"""This is a mixin class to share code for DRY"""
jerome-diver / ipython.test
Last active May 16, 2019
error unexpected (missundertsand inherited class in python 3)
View ipython.test
In [129]: class A:
def __init__(self, x):
self._x = x
self._a_var = "Variable A"
def a_var(self, x):
return self._a_var
class B:
View .vimrc
set t_Co=256
syntax spell toplevel
set spellfile=~.vim/spell/fr.utf-8.add
set spell spelllang=fr
set nospell
set filetype=on
set mouse+=a
if &term =~ "^screen"
set ttymouse=xterm2
jerome-diver / config.php
Created Dec 28, 2018
nginx-passenger with nextcloud-14 (nextcloud faile to print app/files after login with a loop)
View config.php
$CONFIG = array (
'instanceid' => '[private]',
'passwordsalt' => '[private]',
'secret' => '[private]',
'trusted_domains' =>
array (
0 => '',
'datadirectory' => '/usr/local/www/nextcloud/data',
View gist:a66ace397d288f0cb8b59145c9dee0db
### Keybase proof
I hereby claim:
* I am jerome-diver on github.
* I am jeromelanteri ( on keybase.
* I have a public key ASByejrcNS0D_xOeAlq8zELShbrI1340wmn9_a99SDlevwo
To claim this, I am signing this object:
jerome-diver / Install.pm6
Last active Jul 31, 2017
Hash and Associative Hash definition and argument functions...
View Install.pm6
unit module Install;
use Prompt::Gruff::Export;
use Git::Wrapper;
use Check;
use Datas;
my %q = "select_groups" => "Select some groups of repos you want to install ?",
"select_repos" => "Select some repos to install: ",
"select_group" => "Choose a group from where you will install some repos: ";
jerome-diver / .tmux.conf
Created Jul 31, 2017
config include mouse grab actions for vim and tmux together with powerline features for zshrc and airline for vim
View .tmux.conf
source /usr/lib/python3.6/site-packages/powerline/bindings/tmux/powerline_tmux_2.1_plus.conf
set -g prefix C-b
set -g default-terminal "tmux-256color"
set -g history-limit 1000
set -g mouse on
set -g set-titles on
set -g set-titles-string "#T"
setw -g monitor-activity on
set -g visual-activity on
View check.pm6
#the sub function where error is, at line 8
our sub object_repo_exist($yaml, $object, $object_name, $group_name) is export
# $ yaml.datas contain the my.yaml parsed file. checked... exactly same structure and content of datas.
{ #give object=title|url , object_name, group_name
my $i = 0;
my %group = $yaml.datas.first: { $_<group> eq $group_name };
my %repo;
unless (%group<repos>.elems == 0) {
return True if %group<repos>.first: { $_<<$object>> eq $object_name };
You can’t perform that action at this time.