Daily Weekly Monthly

Monthly Shaarli

All links of one month in a single page.

February, 2019

Manual (EN) · recalbox/recalbox-os Wiki · GitHub

The recalbox repository moved to https://gitlab.com/recalbox/recalbox - recalbox/recalbox-os

postgresql - How do I list all databases and tables using psql? - Database Administrators Stack Exchange

Please note the following commands:

\list or \l: list all databases
\dt: list all tables in the current database

You will never see tables in other databases, these tables aren't visible. You have to connect to the correct database to see its tables (and other objects).

To switch databases:

\connect database_name or \c database_name

http://www.postgresql.org/docs/current/interactive/app-psql.html

SUSI AI

Susi AI is an intelligent Open Source personal assistant. It is capable of chat and voice interaction and by using APIS to perform actions such as music playback, making to-do lists, setting alarms, streaming podcasts, playing audiobooks, and providing weather, traffic, and other real time information. Additional functionalities can be added as console services using external APIs. Susi AI is able to answer questions and depending on the context will ask for additional information in order to perform the desired outcome. The core of the assistant is the Susi AI server that holds the “intelligence” and “personality” of Susi AI. The Android and web applications make use of the APIs to access information from a hosted server.

An automatic deployment from the development branch at GitHub is available for tests here https://susi-server.herokuapp.com

Le violeur de la Sambre

Le violeur de la Sambre Un homme au-dessus de tout soupçon

Une longue enquete mais très interressante

retropie - How do I control GPIO-connected fan via code at a certain CPU temperature? - Raspberry Pi Stack Exchange

from gpiozero import LED
#we are using the LED sub-module just as a generic output
fan = LED(18) #for the positive, put the negative in one of the grounds
def cputemp():
f = open("/sys/class/thermal/thermal_zone0/temp")
CPUTemp = f.read()
f.close()
StringToOutput= str(int(CPUTemp)/1000)

while True:
cputemp()
if StringToOutput >= 45:
fan.on()
elif StringToOutput < 45:
fan.off

This is some fairly simple code that gets the temperature from /sys/class/thermal/thermal_zone0/temp in thousandths Celsius divides by 1000 for Celsius and checks if it is more than 45. if it is it turns the "fan" on and if not , it stays off. But you'll almost certainly never need a fan as long as you're not doing anything stupid.

This code was adapted from a SE question but i am not sure which.

February 2019 Beta Version | Recalbox Forum

la version beta qui marche sur le 3b+

the4thdoctor/pg_chameleon: MySQL to PostgreSQL replica system

pg_chameleon is a MySQL to PostgreSQL replica system written in Python 3. The system use the library mysql-replication to pull the row images from MySQL which are stored into PostgreSQL as JSONB. A pl/pgsql function decodes the jsonb values and replays the changes against the PostgreSQL database.

pg_chameleon 2.0 is available on pypi

Creating user, database and adding access on PostgreSQL

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;

Pour Linus Torvalds, ARM ne gagnera pas la concurrence sur le marché des serveurs à cause du niveau de fragmentation élevé et d'autres raisons

Il l’avait déjà dit une fois en octobre 2016, lors de la conférence Linaro Connect, qu’il préférait l’architecture x86 à l'architecture ARM. Il y a un peu plus de deux ans, Torvalds disait que l’ouverture et l’étendue de l’écosystème matériel (PC) formé autour de x86 sont inégalées, alors que l’écosystème ARM reste fragmenté. « Le jeu d’instructions et le noyau du CPU ne sont pas très importants », a déclaré Torvalds. « C’est un facteur sur lequel les gens ont tendance à se fixer, mais […] ce qu...

Pleroma's First Release! 0.9.9 | Lainblog

We are doing a release! Finally! Stable, too!

6 formations en ligne pour apprendre Python - Le Monde Informatique

De plus en plus apprécié par les développeurs, Python est souvent considéré comme un langage simple et aux mises en application multiples. Zoom sur...

BATTLETECH is having a free weekend on Steam, plus a look at other good Linux game deals | GamingOnLinux

The weekend is about to crash into our lives once again, you're sat staring at your screen wondering what to play and we're here to help.

OmniDB - Open Source Web Tool For Database Management

Support Status

PostgreSQL 11
PostgreSQL 10
PostgreSQL 9.6
PostgreSQL 9.5
PostgreSQL 9.4
PostgreSQL 9.3

Oracle
MySQL
MariaDB

Firebird
SQLite
SQL Server
IBM DB2
BookStack

#Simple & Free Wiki Software

BookStack is a simple, self-hosted, easy-to-use platform for organising and storing information.

Python: Call Functions by String | Open Source Kitty

Approach 3: Synbol Tables

Built-in function locals() and globals() return a dictionary of current local and global symbol table respectively. So you could call a function just like:

def my_func(arg1, arg2):
print(arg1, arg2)
return arg1 + arg2

r = locals()['my_func'](http://1, 2)
print(r)

The output is:

1 2
3

This approach is just like the examples provided in the very beginning of this post, in which, I maintained a symbol table by myself and called the function by its string-typed name.

L'histoire secrète des femmes dans le codage informatique – The New York Times | histoire lyonel kaufmann.ch

Qui sait que dès années 1940 aux années 1980, la place des femmes dans la programmation des ordinateurs était bien meilleure qu’aujourd’hui ? Qu’est ce qui s’est mal passé ? Le New York Times Magaz…

La bataille entre vrai open source et faux open source s'intensifie - ZDNet

L'open source tel que nous l'avons connu est-il désormais obsolète ? Faut-il le remplacer ? Certaines entreprises affirment que oui, alors que d'autres dénoncent un non-sens !

readability-lxml · PyPI

readability en python... humm ça me fait envie...

Quelle est la différence entre Flexbox et Grid ? - Zen Devs

Essayons de répondre à cette question avec des points rapides plutôt que de longues explications. Il y a beaucoup de similitudes entre flexbox et grid, à

Sécurité sur le Cloud (2) : solutions et cas concrets D2SI Blog

Filtrage réseau, gestion des comptes et des accès, chiffrement et clé, conformité... retour d'expérience sur la sécurité dans le Cloud à travers des cas concrets.

Researchers Find Further Evidence That Schizophrenia is Connected to Our Guts - D-brief

Giving healthy mice gut bacteria from schizophrenic patients caused them to display symptoms of the disease.

Bulk inserting on table with foreign key field - Stack Overflow

Well, if you don't know ahead of time which servers are present in the DB it seems like your problem is the data-structure you're using. Keeping server_name -> member_names in a dict like that and trying to insert it all in one go is not how relational databases work.

Try this:

server_to_id = {}
for server_name in data:
if server_name not in server_to_id:
server = Server.create(name=server_name)
server_to_id[server_name] = server.id

for server_name, member_names in data.items():
server_id = server_to_id[server_name]
member_data = [{'name': name, 'server': server_id} for name in member_names]
Member.insert_many(member_data).execute()

Note: don't forget to call .execute() when using insert() or insert_many().

Veille technologique : Rester à jour sans devenir taré(e) - Je suis un dev

La veille technologique c'est une question de vie ou de mort. Tu le sais que si tu restes pas à jour t'es foutu ? En tous cas y'a plein de gens pénibles comme moi qui te le répètent en permanence.

Caches: LRU v. random

Très intéressant... Je m'en servirais en archi microservice. On a tjrs besoin de cache...

2 random lru > lru simple.

Certification AWS | Cours de formation | AWS

Obtenez votre certification AWS ! Prenez des cours de formation Amazon, profitez des ressources de certification Amazon pratiquez afin de vous préparer aux examens de certification.

Modern Alternatives to PGP

Did your last Yubikey just break? Perhaps you forgot an offline backup password.
Maybe you're just tired of living like a spy
[https://gist.github.com/grugq/03167bed45e774551155] and never using
smartphones. Whatever it is, you're here, and you're finally ready to give up
on
PGP [https://blog.filippo.io/giving-up-on-long-term-pgp]. That's great!

We're here to help!No one was sending you encrypted emails anyway, so that's
easy enough. But the most widespread uses of PGP are machine-oriented, fo

Welcome to Flask — Flask 1.0.2 documentation

Welcome to Flask

Flask: web development, one drop at a time

Welcome to Flask’s documentation.
Get started with Installation and then get an overview with the Quickstart.
There is also a more detailed Tutorial that shows how to create a small but complete application with Flask.
Common patterns are described in the Patterns for Flask section.
The rest of the docs describe each component of Flask in detail, with a full reference in the API section.

Flask depends on the Jinja template engine and the Werkzeug WSGI toolkit.

How to style different sites with one CSS collection

How one CSS collection can define the styles for multiple sites that look different.

Via shaarli

Le Coût de l'expat : Comparer le coût de la vie des expatriés

Comparaison du cout de la vie entre Paris et Tokyo
ATTENTION:

  • je ne sais pas d’où viennent les données (je n'ai pas encore regarde)
  • comparaison de certains prix en comparants les données de chaque pays
  • pas d'explication sur les tarifs d'abonnements ni sur les "frais caches"
sharkdp/bat: A cat(1) clone with wings.

A cat(1) clone with syntax highlighting and Git integration.

A chaque sprint sa rétrospective (REX) | Agile Mouse

Aller un bon REX ca fait pas de mal ! ( meme en famille ou entre amis parfois... )

GitHub - clux/muslrust: Docker environment for building musl based static rust binaries

A plain docker environment for building static binaries compiled with rust and linked against musl instead of glibc. Built nightly on travis.

This is only useful if you require external C dependencies, because otherwise you could do rustup target add x86_64-unknown-linux-musl.

This container comes with a bunch of statically compiled C libraries using musl-gcc so that we can statically link against these as well.

If you already have rustup installed on the machine that should compile, you might consider cross as a more general solution for cross compiling rust binaries.
Usage

Pull and run from a rust project root:

docker pull clux/muslrust
docker run -v $PWD:/volume --rm -t clux/muslrust cargo build

You should have a static executable in the target folder:

ldd target/x86_64-unknown-linux-musl/debug/EXECUTABLE
not a dynamic executable

From there on, you can include it in a blank docker image (because everything you need is included in the binary) and perhaps end up with a 5MB docker blog image.

Rustlog : Why is a Rust executable large?

This post is intended as a tour of various techniques (not necessarily all practical) of reducing program size, but if you demand some conclusion, the pragmatic takeaway is that:

Compile with --release.
Before distribution, enable LTO and strip the binary.
If your program is not memory-intensive, use the system allocator (assuming nightly).
You may be able to use the optimization level s/z in the future as well.
I didn’t mention this because it doesn’t improve such a small program, but you can also try UPX and other executable compressors if you are working with a much larger application.

Via http://nicolas-delsaux.hd.free.fr/Shaarli/?x0e0Fw

Rocket - Simple, Fast, Type-Safe Web Framework for Rust

Meet Rocket.
Rocket is a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety.

Via http://nicolas-delsaux.hd.free.fr/Shaarli/?zszx1Q

volt | fast native desktop client for all major messaging services

Native desktop client for Slack, Skype, Gmail, Facebook, and more

Via shaarlo et sam&max.

Merci pour le poisson

WillMyPhoneWork.net - Check if your phone works on a network

Check 2G, 3G, and 4G LTE Network Frequency Compatibility for a Smartphone, Tablet, and Mobile Device in any Country and Mobile Network Carrier

Cloud Programming Simplified: A Berkeley View on Serverless Computing - RISE Lab

David Patterson and Ion Stoica The publication of “Above the Clouds: A Berkeley View of Cloud Computing” on February 10, 2009 cleared up the considerable confusion about the new notion of “Cloud Computing.” The paper defined what Cloud Computing was, where it came from, why some were excited by it, what were its technical advantages, and what were the obstacles and research opportunities for it to become even more popular.  More than 17,000 citations to this paper and an abridged version in CACM—with more than 1000 in the past year—document that it continues to shape the discussions and the evolution of Cloud Computing. “Cloud Programming Simplified: A Berkeley View on Serverless Computing” with some of the same authors commemorates the ... Read More

OpenSSH Integration with Pageant · git-for-windows/git Wiki · GitHub

Modification a faire pour gerer gpg-agent

dans C:\Program Files\Git\cmd> start-ssh-pageant

ssh-pageant-done
gpgconf --launch gpg-agent

failure

OpenSSH Integration with Pageant

For some users, it may be desirable to tie OpenSSH in to the PuTTY authentication agent (Pageant) using ssh-pageant. This is a drop-in replacement for ssh-agent, which simply builds a connection between OpenSSH and Pageant for key-based authentication. The tool makes it easy to leverage OpenSSH for remote repository access, which tends to be the most reliable choice within the specific context of Git for Windows (Git), without the need to run multiple agents which don't interoperate.

This functionality became available with the release of Git 2.8.2.

Starting ssh-pageant Manually from Git Bash

If you always use Git from within Git Bash, then the most straightforward approach is to have it launch ssh-pageant on your behalf. Simply create/edit your _$HOME/.bashprofile (or $HOME/.profile, if you prefer), and add the following.

# ssh-pageant allows use of the PuTTY authentication agent (Pageant)
SSH_PAGEANT="$(command -v ssh-pageant)"
if [ -x "$SSH_PAGEANT" ]; then
   eval $("$SSH_PAGEANT" -qra "${SSH_AUTH_SOCK:-${TEMP:-/tmp}/.ssh-pageant-$USERNAME}")
fi
unset SSH_PAGEANT

The -qra "${TEMP:-/tmp}/.ssh-pageant" construct is equivalent to the -q -r -a filename options. In this context it means:

  • -a filename -- Bind to a specific socket file (creating it if necessary)
  • -r -- Allow reuse of an existing socket file (exit without error if an existing ssh-pageant/ssh-agent process is using it)
  • -q -- Quiet mode (don't echo the PID, if starting a new ssh-pageant process)

By specifying the socket name (defaulting to $SSH_AUTH_SOCK, if set) along with the reuse option, we ensure that only a single running copy of ssh-pageant (per user) is required. Otherwise a separate incarnation would be launched every time Git Bash is invoked.

Verify ssh-pageant Functionality

Now start a new Git Bash session, or source the profile edited just above, and run the ssh-add -l command. If all is well, and Pageant is running (with one or more keys loaded), you should see something similar to the following.

$ ssh-add -l
4096 SHA256:XjN/glikgdBoBclg4EaN8sJ/ibrxTq7zVydpkUwANzk Heinz Doofenshmirtz (RSA)

Starting ssh-pageant Automatically at Logon

If you use Git from Git CMD, or directly from the Windows command prompt, then you'll probably want to ensure that ssh-pageant is launched automatically at logon time. The start-ssh-pageant.cmd script is provided for this purpose, which resides in the cmd subdirectory of your Git installation.

Setting the Environment

Unlike the Git Bash case above, this scenario requires the SSH_AUTH_SOCK environment variable to be set before running the script... otherwise it will simply exit without performing any action. This is normally configured as a persistent USER variable, with the value specifying the desired socket file path in Unix/MSYS2 format.

NOTE: Since there can only be a single global variable of a given name, this approach may or may not cause conflicts if you have multiple environments which utilize the SSH_AUTH_SOCK setting. Running Git alongside of Cygwin, or MSYS2, for example. One way to address this is to use a fully-qualified Windows path for the socket instead of an environment-specific Unix/MSYS2 path.

Windows 7

Launch the Control Panel, and then select System followed by Advanced system settings. Click on the Environment Variables button, and finally New... in the User variables (not System variables) section. Enter SSH_AUTH_SOCK for Variable name and /tmp/.ssh-pageant-%USERNAME% for Variable value, then click OK.

Now launch a new Git CMD or Windows command prompt (pre-existing sessions won't see the new variable), and enter the command set SSH_AUTH_SOCK. If all went according to plan, you should see something similar to the following.

C:\Users\heinz.doofenshmirtz> set SSH_AUTH_SOCK
SSH_AUTH_SOCK=/tmp/.ssh-pageant-heinz.doofenshmirtz

NOTE: the cross-environment-compatible (git for windows, msys2, and cygwin) equivalent would require a fully qualified windows path like C:\Users\MYUSERNAME\AppData\Local\Temp\.ssh-pageant-MYUSERNAME. The correct value can be determined by running a command like cygpath --windows /tmp/.ssh-pageant-%USERNAME% in a Git Bash window.

Launch ssh-pageant

At this point you should run start-ssh-pageant.cmd manually, in order to verify that the agent starts successfully. Assuming that Git is installed into C:\Program Files\Git, this should look something like:

C:\Program Files\Git\cmd> start-ssh-pageant
Starting ssh-pageant...
SSH_AUTH_SOCK='/tmp/.ssh-pageant-heinz.doofenshmirtz'
SSH_PAGEANT_PID=11444

Assuming that the relevant keys have been loaded into Pageant, you should now be able to perform Git operations which rely upon them using OpenSSH without being prompted for the passphrase.

Configure Automatic Startup

The most common approach is to create a shortcut pointing to start-ssh-pageant.cmd, and place it in your startup folder (Start Menu / Programs / Startup). Once in place, it should be launched automatically when you logon to Windows and be available to all Git processes.

Windows 7

  1. Click the Start button, right click on All Programs, and select Open
  2. Navigate into the Programs folder, followed by Startup
  3. Right-click on an empty spot within Startup, and select New / Shortcut
  4. Click Browse, navigate to the cmd folder underneath your Git installation, and select start-ssh-pageant.cmd. Click OK.
  5. Click Next
  6. Enter an alternate name for the shortcut, if desired, and click Finish

Security Considerations

Since ssh-pageant (like ssh-agent) is intended to bypass the requirement to repeatedly enter your private key password, it's imperative that its socket file be private in order to use it safely. In other words, you want to be extremely careful on multi-user systems to ensure that the SSH_AUTH_SOCK file -- and preferably the directory which includes it -- isn't accessible to anyone else. For a normal Git for Windows configuration this shouldn't be an issue, as /tmp is normally mapped to a private location under your Windows user profile.

Home | MiniSearch

MiniSearch is a tiny but powerful in-memory fulltext search engine for JavaScript. It is respectful of resources, and it can comfortably run both in Node and in the browser.

#Use case

MiniSearch addresses use cases where full-text search features are needed (e.g. prefix search, fuzzy search, boosting of fields), but the data to be indexed can fit locally in the process memory. While you may not index the whole Wikipedia with it, there are surprisingly many use cases that are served well by MiniSearch. By storing the index in local memory, MiniSearch can work offline, and can process queries quickly, without network latency.

A prominent use-case is search-as-you-type features in web and mobile applications, where keeping the index on the client-side enables fast and reactive UI, removing the need to make requests to a search server.

La boîte à outils du Product Owner • Lucy in the Scrum

la boite à outils du product owner

Centre des Liaisons Européennes et Internationales de Sécurité Sociale

Le Cleiss (Centre des liaisons européennes et internationales de sécurité sociale) est un établissement public national, notamment chargé d'informer sur la protection sociale dans un contexte de mobilité internationale. Il est placé sous la double tutelle du ministre chargé de la sécurité sociale et du ministre chargé du budget.

python-cheatsheet/README.md at master · gto76/python-cheatsheet · GitHub

Comprehensive Python Cheatsheet. Contribute to gto76/python-cheatsheet development by creating an account on GitHub.

Python Application Layouts: A Reference – Real Python

Table of Contents

Command-Line Application Layouts
    One-Off Script
    Installable Single Package
    Application with Internal Packages
Web Application Layouts
    Django
    Flask
Conclusions and Reminders
Structuring Your Project — The Hitchhiker's Guide to Python

Un Projet en Python ?

  • Comment le structurer
  • Comment organiser les fichiers
  • Quels fichiers creer et pourquoi
  • Quelques bonnes pratiques.
Challenges infos: "test your skill" -

Ya pas mieux qu'un petit CTF pour s'entraîner à résoudre des challenges informatiques. Pour les initiés, CTF signifie Capture The Flag. C'est un excellent

Apprendre le japonais - Ici-Japon

Bienvenue sur les cours de Japonais d'Ici Japon !
La méthode d'Ici Japon, c'est 28 cours de japonais complets et gratuits, accompagnés d'exercices et de fiches pratiques qui vous permettent d'assimiler la langue de manière progressive et naturelle.
Pour accélérer considérablement votre apprentissage, utilisez nos applications smartphone basées sur des mnémoniques. Ce sont des outils indispensables grâce auxquels l'écriture japonaise vous paraîtra beaucoup plus simple !

marker/README.md at master · pindexis/marker · GitHub

The terminal command palette. Contribute to pindexis/marker development by creating an account on GitHub.

Configuring Pipenv in Visual Studio Code - Olav Lindekleiv
  • dans le dossier du projet
  • taper pipenv --venv
  • copier le retour
  • sous windows ajouter /Scripts/python.exe à la fin (la ou est python.exe)
  • dans VSCode ouvrir le settings.json qui est dans .vscode du projet
  • changer le path vers python par celui que vous venez de trouver.
  • en gros changer python.pythonPath
  • redémarrer VSCode
  • c'est bon python trouvera les dependances.
Qu’est-ce qu’une api REST ou restful ? | SUPINFO, École Supérieure d'Informatique

Très bon article très pédagogique.

(avec toutes les nuances que l'on veut entre les différents niveaux... :/ )

CSS Styling Nginx Directory Listings | Nick Bettison LINICKX.com

Changer le style de l'autoindex de NGINX via un hook et deux fichier ?

pas mal je vais tester

Distinguish between OpenVPN and XMPP - Help! - HAProxy community

use_backend main-ssl if { req.ssl_hello_type 1 }
#use_backend openvpn if !{ req.ssl_hello_type 1 } !{ req.len 0 } // j'ai pas de VPN sur mon serveur.
use_backend xmpp if { payload(0,5) 3c3f786d6c } !{ req.ssl_hello_type 1 } !{ req.len 0 }
use_backend xmpp if { payload(0,5) 3c3f20786d6c } !{ req.ssl_hello_type 1 } !{ req.len 0 }

3c3f786d6c pour <?xml

3c3féà786d6c pour <? xml (en fonction des logiciels... :/ )

Unlocking God Mode on x86 Processors | Hackaday

Super une porte dérobé dès la conception des processeurs... De mieux en mieux...

Innovation. Des panneaux solaires révolutionnaires ! - Monde - LeTelegramme.fr

« On peut les appliquer quasiment partout »

« La technologie des pérovskites nous rapproche de l’objectif des bâtiments autosuffisants en énergie », souligne Adam Targowski, responsable du développement équitable chez Skanska. « Les pérovskites font leurs preuves même sur les surfaces peu exposées au soleil. On peut les appliquer quasiment partout. Plus ou moins transparents, les panneaux répondent aussi aux exigences du design. Grâce à leur souplesse et leurs teintes variables, pas besoin de construire des supports supplémentaires, d’intervenir sur la forme ou le dessin du bâtiment », explique-t-il.

Un panneau standard d’environ 1,3 m2, au coût attendu de 50 euros et au rendement comparable aux panneaux classiques, approvisionnera en énergie un poste de travail en bureautique à longueur de journée, selon les estimations actuelles. Un autre test grandeur nature a été lancé sur un hôtel au Japon, près de Nagasaki.

En quelques années seulement, « les pérovskites ont fait un long chemin, souligne le professeur Nazeeruddin, qui avait, par le passé, collaboré avec Olga Malinkiewicz. Leur efficacité étant passée de 3,8 % à 23,7 % », un taux comparable à celui des panneaux classiques en silicium.

Xiaomi Firmware Updater

The ultimate script that provides firmware packages for most Xiaomi devices.

Skyrim on Linux Steam Play - No Voice/No Music Audio Fix : linux_gaming

Alors pour que ca marche chez moi j'ai du :

  • activer Steam Beta client
  • redemarrer steam
  • activer steam play pour tous les titres
  • installer Skyrim Special Edition
  • installer protontricks et winetricks
  • lancer protontricks -s Skyrim pour trouver l'id du jeu
  • lancer protontricks 489830 winetricks --force xact
  • lancer protontricks 489830 winecfg
  • dans Libraries mettre xaudio2_6 et xaudio2_7, a native
  • choisir "NewColossus_..." dans applications
  • dans Libraries ajouter xaudio2_6 et xaudio2_7, en native

Voila le jeu a du son Oo