Avant-hier matin, mercredi 13 août, suite à une mise à jour vers Ubuntu 22 de mon serveur, j'ai eu la mauvaise surprise de ne pas le voir redémarrer...
Subissant en plus un rhume carabiné, je me suis un peu décomposé en voyant mes systèmes de supervision m'alerter lorsque la vingtaine …
Just a quick blog post about Wordpress configuration, mostly as a reminder to myself.
If you manage a public website, you probably want it to include some HTML metadata: it is important for referencing your website in search engines, as well as to provide a nice "preview miniature" on social …
TL;DR: There are three options to fix an NPM dependency:
- Open a bug ticket on the repository of the maintainer
- Fork & Fix
- Create a patch and fix it
J'avais tendance à privilégier la 2e solution, mais elle a l’inconvénient de créer une dépendance à github.com
au moment du build, ce qui n'est pas toujours pratique dans un contexte d'entreprise... patch-package
peut donc s'avérer bien pratique dans ce cas
Ce cours a pour but de t’apprendre à parler le Python. Il s’agit d’un langage particulier — un langage de programmation — pour communiquer avec ton ordinateur afin de lui demander de réaliser des tâches précises (comme exécuter un calcul, récupérer des événements du clavier, afficher une image à l’écran, etc.), c’est-à-dire exécuter un programme informatique (un logiciel).
Turns out PHP standard crc32
method is non-standard (while crc32b
is).
Here is how to implement it in Python:
def php_crc32(a):
'''
References:
- https://www.php.net/manual/en/function.hash-file.php#104836
- https://stackoverflow.com/a/50843127/636849
'''
crc = 0xffffffff
for x in a:
crc ^= x << 24;
for k in range(8):
crc = (crc << 1) ^ 0x04c11db7 if crc & 0x80000000 else crc << 1
crc = ~crc
crc &= 0xffffffff
# Convert from big endian to little endian:
return int.from_bytes(crc.to_bytes(4, 'big'), 'little')
from random import*;import time,sys;import curses as h;w=h.initscr();h.noecho() #
P,Q,m,s,e,p,a,q=20,10,5,300,{0:"· ",1:"██"},[[[1,1]]*2,[[0,1,0],[1]*3,[0]*3],[[1#
,0,0],[1]*3,[0]*3],[[0,0,1],[1]*3,[0]*3],[[1,1,0],[0,1,1],[0]*3],[[0,1,1],[1,1,0#
],[0]*3],[[0]*4,[1]*4,[0]*4,[0]*4]],range,len;M,b=p[randint(0,6)],[[0]*Q for r #
in a(P)];h.cbreak();y,R,C,cr,l,d,n=lambda z,x,y:e[z[x][y]],0,4,0,1,s,p[randint(0#
,6)];w.nodelay(1);w.keypad(1);h.curs_set(0);A,B,sw=list,zip,{'U':'if not k(R,C'+#
',A(B(*M[::-1]))):M=A(B(*M[::-1]))','D':'V();R+=1','L':'if not k(R,C-1,M):C-=1',#
'R':'if not k(R,C+1,M):C+=1'};exec(('def k(R,C,se):\n for(r,c)in[(r,c)for c in '#
'a(q(M))for r in a(q(M))]:\n if se[r][c]>0 and(not(0<=R+r<P and 0<=C+c<Q)or b['#
'R+r][C+c]>0):return 1\ndef V():\n global R,C,M,n,l,d\n if(k(R+1,C,M)and R<1 an'#
'd sys.exit())or k(R+1,C,M):\n for(r,c)in[(r,c)for c in a(q(M))for r in a(q(M)'#
')]:\n if R+r in a(P)and C+c in a(Q)and M[r][c]>0:b[R+r][C+c]=M[r][c]\n M,n,'#
'R,C,d=n,p[randint(0,6)],-1,4,s+m-l*m\n for i in[j for j in a(P)if sum(b[j])>9'#
']:b[1:i+1]=b[:i];b[0],l=[0]*Q,l+1\ntry:\n while 1:\n o,z=a(q(n)),a(q(M));u=[('#
'r,c)for c in z for r in z];time.sleep(.001)\n for(r,c)in[(r,c)for c in a(Q)fo'#
'r r in a(P)]:`(r,c*q(e),y(b,r,c))\n for(r,c)in[(r,c)for(r,c)in u if M[r][c]>0'#
']:`(R+r,(C+c)*2,y(M,r,c))\n for(r,c)in[(r,c)for c in o for r in o]:`(r,22+c*2'#
',y(n,r,c)+"· · ")\n try:cr=(cr+1)%d;ch=w.getkey();exec(sw[ch[4:5]]);raise\n '#
'except:exec("if cr<1:V();R+=1");`(P,0,"level "+str(l))\nexcept:h.echo();w.keyp'#
'ad(0);h.nocbreak();h.endwin();print("level "+str(l))').replace('`','w.addstr'))#
Amazing ! Reminds me of the International Obfuscated C Code Contest
Avec ce tutoriel vous verez comment rendre votre site web plus rapide : de l’optimisation des requêtes, à l’affichage de la page, en passant par la génération des pages web et l’affichage correct des pages sur tous les terminaux.
Here is a patch to the pdfjam
shell script to make it work under Cygwin:
--- pdfjam.original 2019-01-07 16:12:47.894523500 +0100
+++ pdfjam.patched-for-cygwin 2019-01-07 16:12:33.492142300 +0100
@@ -949,6 +949,9 @@
(umask 077 && mkdir "$PDFJAM_TEMP_DIR")
fi
umask $original_umask
+case `uname` in
+ *CYGWIN*) PDFJAM_TEMP_DIR=`cygpath -w "$PDFJAM_TEMP_DIR"`;;
+esac
##
## TEMPORARY DIRECTORY ALL DONE
##
@@ -1073,7 +1076,10 @@
sourceFullPath="$sourceDir"/"$pdfName"
uniqueName="source-$counter.pdf"
uniqueName="$PDFJAM_TEMP_DIR"/"$uniqueName"
- ln -s "$sourceFullPath" "$uniqueName"
+ case `uname` in
+ *CYGWIN*) cp "$sourceFullPath" "$uniqueName";;
+ *) ln -s "$sourceFullPath" "$uniqueName";;
+ esac
;;
esac
filePageList="$filePageList","$uniqueName","$pageSpec"
@@ -1123,6 +1129,7 @@
texFile="$fileName".tex
msgFile="$fileName".msgs
tempFile="$PDFJAM_TEMP_DIR"/temp.tex
+backslashsafe_filePageList=$(echo $filePageList | sed 's~\\~/~g')
(cat <<EndTemplate
\batchmode
\documentclass[$documentOptions]{article}
@@ -1137,7 +1144,7 @@
\usepackage{pdfpages}
$preamble
\begin{document}
-\includepdfmerge[$miscOptions]{$filePageList}
+\includepdfmerge[$miscOptions]{$backslashsafe_filePageList}
\end{document}
EndTemplate
) > $texFile
tl;dr :
- Start using [your software] in production in a non-critical capacity (by sending a small percentage of traffic to it, on a less critical service, etc)
- try to have each incident only once
- Understand what is ok to break and isn’t
For example, with Kubernetes:
- ok to break:
- any stateless control plane component can crash or be cycled out or go down for 5 minutes at any time
- kubernetes networking can break as much as it wants because we decided not to use it to start
- not ok to break
- for us, if etcd goes down for 10 minutes, that’s ok
- containers not starting or crashing on startup
- containers not having access to the resources they need
- pods being terminated unexpectedly by Kubernetes
With Envoy, the breakdown is pretty different:
Not very insightful, but I'm retaining some quotes:
But IT operations includes much more than the limited “ops” functions we typically fold into a DevOps team. I’m talking about things like ticket management, incident handling, user management and authorization, backups and recovery, network management, security operations, infrastructure procurement and cost optimization, compliance reporting, and much more. In today’s IT organization, where do these responsibilities fall?
You want DevOps teams to have a streamlined, low lead-time, lean pipeline to production. Devoting team capacity to this broader set of operational functions may slow down this pipeline. There are also efficiencies to be gained by sharing these practices across the work of all the DevOps teams.
All of this is to say that a portion of IT operations still exists independently of the DevOps teams, performing those “ops” functions that are not in “DevOps” while the DevOps teams focus on that subset of ops functions specifically related to deploying code and responding to code-related incidents
Record, replay, and stub HTTP interactions.
- 🚀 Fetch & XHR Support
- ⚡️️ Simple, Powerful, & Intuitive API
- 💎 First Class Mocha & QUnit Test Helpers
- 🔥 Intercept, Pass-Through, and Attach Events
- 📼 Record to Disk or Local Storage
- ⏱ Slow Down or Speed Up Time
- Input injection
- Parsing XML
- Assert statements
- Timing attacks
- A polluted site-packages or import path
- Temporary files
- Using yaml.load
- Pickles
- Using the system Python runtime and not patching it
- Not patching your dependencies
Based on Clean Architecture, by Robert Martin,
with code examples and detailed explanations.
Au programme de cette présentation de Marie Guillaumet, d'Access42 :
- Caractères – microtypo
- Composition – macrotypo
- Effets décoratifs
- Écriture inclusive
Transpiling JS code with BabelJS & a Makefile, with integration for Flow JS static types annotations
Les éditeurs « classiques » [d'articles scientifiques] ont auss réagi par rapport au libre accès. Toutes sortes « d’exceptions » ont été mises en place. Par exemple pour la revue Artificial Intelligence In Medicine (édité par Elsevier) où j’ai publié :
- les auteurs peuvent payer pour avoir leur article en libre accès (N. B. : hors de prix, mais certains projets de recherche, notamment européen, exigent que ce soit le cas) ;
- un lien est fourni aux auteurs qui permet de télécharger gratuitement l’article pendant 50 jours, et ce lien peut être diffusé à volonté ;
- après six mois d’embargo, une « version auteur » (même contenu que le vrai article, mais sans la mise en forme de l’éditeur) peut être mise à disposition librement sur des serveurs comme HAL (Hyper‐Archives en Ligne) ;
- les auteurs ont le droit de mettre une « version auteur » sur leur site personnel dès la parution de l’article, sous licence Creative Commons Attribution Non‐Commercial No Derivatives ».
En commentaire, de chouettes visualisations d'ontologies OWL en ligne : https://hal.archives-ouvertes.fr